Text to paragraph tags
Turn plain text into HTML <p> fragments, split on blank lines, with optional <br> inside paragraphs and HTML escaping on by default.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Paragraph snippet
Only <p> fragments are produced, no html / body wrapper.
Enter text to generate <p> fragments
What this tool does
- Convert plain body text copied out of Word, Google Docs or email into <p> fragments split on blank lines.
- Keep hard line breaks inside a paragraph (poems, addresses) by rendering them as <br>.
- Escape & < > by default so pasted text cannot break the surrounding HTML structure.
Example
Input
第一段 第二行 第二段
Output
<p>第一段<br>第二行</p> <p>第二段</p>
Blank lines split paragraphs, inner line breaks become <br>, and each paragraph is one <p>, joined with a newline.
Frequently asked questions
Do consecutive blank lines create empty paragraphs?
No. By default a run of blank lines counts as a single paragraph break, so you never get <p></p>. Enable "keep empty paragraphs" when you really need them.
How is this different from the newline-to-<p> converter?
That one starts a new paragraph at every line break, which fits line lists. This tool splits on blank lines and keeps inner line breaks as <br>, which fits prose.
Why is there no <html> or <body> wrapper?
Only a pasteable body fragment is produced, so you can drop it into your own template. Wrap it yourself if you need a full document.
What if my input already contains HTML?
Switch off HTML escaping. The tags are then passed through unchanged and you are responsible for keeping the structure valid.
Keywords:paragraph tagsnewline to phtml escape