Markdown to Literotica format converter

sleepybowl

Virgin
Joined
Mar 8, 2022
Posts
10
I created a tool to convert text in Markdown syntax to the Literotica plaintext format with a few allowed HTML tags (the format required to publish stories).

https://markdown-to-literotica.pages.dev/
(updated: 2025-10-13)

Hope it's helpful. Let me know if you encounter bugs or have suggestions.

Tip:
One way to output Markdown for rich formatted text is to use Google Docs. Enable Markdown, and then right-click and select "Copy as Markdown". Instructions here.

Notes:
  • Tool supports HTML tags documented in the official FAQ and FrancesScott's Guide.
  • Gracefully handles line breaks, paragraphs, and tag closing per line based on feedback here.
  • Replace unicode characters Em Dash "—" and Ellipsis "…" with the HTML entities "—" and "…"
  • See the Help Modal for supported Markdown syntax conversions.
  • All data is processed locally in your browser. No data is transmitted or stored remotely. VirusTotal scan
 
Last edited:
Thanks for building this!

Check out https://www.literotica.com/s/how-to-format-a-story-with-html?comments_after=19169202 by @FrancesScott as it documents a few other supported tags. For example, I think <kbd></kbd> would be a natural way to render backticks, and <blockquote></blockquote> for > (even though it weirdly only works in publications not previews) . Ordered and unordered lists also render fine.

Also, TIL that markdown interprets a single underscore or asterisk as italics, and two of either as bold. I guess it's a slack special to interpret underscore as italic and asterisk as bold.
 
something to be aware of; <kbd> does not support carriage return. Lit will detect the CR and close the <kbd> block itself, thus flinging a kraken into your Faberge formatting.

Ask me how I know 😭
 
something to be aware of; <kbd> does not support carriage return. Lit will detect the CR and close the <kbd> block itself, thus flinging a kraken into your Faberge formatting.

Ask me how I know 😭
Yes, unfortunately this tool doesn't seem to be aware of the paragraph-breaking quirks of Literotica's text processing algorithm:

1760339712653.png

This won't work correctly after publishing, because Lit will surround each line with <p> tags (to create paragraphs) and close the <strong> tag at the end of the first line without reopening it afterwards. As a result paragraphs 2 and 3 won't get bolded.

AFAIK you can catch this particular issue in Lit's preview mode, without actually submitting anything for publication, so the problem should be relatively easy to test for and fix.
 
AFAIK you can catch this particular issue in Lit's preview mode, without actually submitting anything for publication, so the problem should be relatively easy to test for and fix
Not my experience. What looks fine on preview gets murdered during publishing. These days I err on the side of caution. Lit supporting complex formatting properly is a distant, glorious dream
 
Thanks for building this!

Check out https://www.literotica.com/s/how-to-format-a-story-with-html?comments_after=19169202 by @FrancesScott as it documents a few other supported tags. For example, I think <kbd></kbd> would be a natural way to render backticks, and <blockquote></blockquote> for > (even though it weirdly only works in publications not previews) . Ordered and unordered lists also render fine.

Also, TIL that markdown interprets a single underscore or asterisk as italics, and two of either as bold. I guess it's a slack special to interpret underscore as italic and asterisk as bold.
Thanks for the mention.
 
Not my experience. What looks fine on preview gets murdered during publishing. These days I err on the side of caution. Lit supporting complex formatting properly is a distant, glorious dream
Issues with paragraphs and each of <em>, <strong>, and <kbd> do not appear in preview, only in the final published HTML.

If you have multiple paragraphs which need to be italicized, each must have an opening <em> and a closing </em>.

Again, you can’t trap this issue in Preview.
 
Again, you can’t trap this issue in Preview.
Yup, just double-checked and this is sadly correct. The Preview won't actually insert <p> tags at all, it simply converts physical line breaks into <br>'s which hides all sorts of phenomena, such as how poems will be (incorrectly) rendered if you separate the verses with just one line break.

In other words, you can't really trust it other than for short inline formatting; anything that spans multiple paragraphs needs to be opened & closed for each paragraph separately.
 
The sad thing is that markdown is almost universally supported and supporting it would make publishing a lot more predictable.

Of course, the layout slut in my head wants laTeX-based control...
 
The sad thing is that markdown is almost universally supported and supporting it would make publishing a lot more predictable.
Indeed. One of my first questions on this forum was basically, "Why doesn't Lit support Markdown when everyone else has been doing it for a decade?"

In response I heard that it's essentially some newfangled fad and that Lit shouldn't waste time trying to chase the latest ephemeral trends and stick to what it's already doing.

I spent the remainder of that week prying my hand off of my forehead.
 
Thanks for all the feedback! I'm a first time story submitter on Literotica so I was unaware of all these quirks.

The tool has been updated. All the feedback here has been addressed, in theory. Please test and report any issues. 🙏

Hope it all works.

Changelog:
- Added support for inline code ` and code block ``` conversion to <kbd>
- Added support for blockquote > conversion to <blockquote>
- Added support for ordered (1. item) and unordered lists (- item)
- Add <br/> for single line break and collapse into single line; leave multiple newlines or empty lines alone and let Literotica insert <p> on their end
- Added Help Modal
- Improved performance

One of my first questions on this forum was basically, "Why doesn't Lit support Markdown when everyone else has been doing it for a decade?"
My exact thoughts! Hence this tool. Too annoying to have to manually convert text into a limited set of HTML.
 
Last edited:
Thanks @sleepybowl for creating the tool!

I admit, most of the lingo here is like a foreign language to me, but I wanted to ask about em dash. I tested the tool and it didn't output the HTML for em dash: &mdash;

Is that an oversight or am I uninformed?
 
I tested the tool and it didn't output the HTML for em dash: &mdash;

Is that an oversight or am I uninformed?

I looked into the em dash. As far as I know, if the webpage specifies to the browser it's using UTF-8 character encoding, then Unicode characters like em dashes are displayed just fine as-is. Looking at Literotica's story pages, I see <meta charset="utf-8"> in the source code, so I think em dashes should work fine without using HTML entity &mdash;

Please correct me if that's not true in practice, I could be missing another quirk.
 
Back
Top