Newline to paragraph tags
Convert line-based text into <p> paragraph tags, one paragraph per line, with HTML escaping by default plus optional blank-line and trim handling.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Paragraph snippet
One <p> per line, order preserved, no <br> inside paragraphs.
Enter text to get one <p> per line
What this tool does
- Wrap a line-per-item list (keywords, captions, field dumps) into <p> paragraphs that can be pasted into a CMS template.
- Keep the original order: the number of lines equals the number of paragraphs, so nothing is silently merged.
- Escape & < > by default so half-finished markup in pasted text cannot break the surrounding page.
Example
Input
alpha beta
Output
<p>alpha</p> <p>beta</p>
Two input lines become two paragraphs in order; blank lines are skipped by default and reported separately.
Frequently asked questions
How is this different from the blank-line paragraph converter?
This tool wraps every single line, with no merging and no <br> handling. The other one splits on blank lines and keeps inner breaks as <br>, which suits prose. Use this one for line lists.
What happens to blank lines?
They are skipped by default. Enable "Emit <p></p> for blank lines" to turn each blank line into an empty paragraph. Either way the count of blank lines is shown in the statistics.
Is leading whitespace stripped?
No, indentation is preserved by default so code and indented lists survive. Enable "Trim whitespace around each line" when you want tidy output.
Does it produce a full HTML document?
No. Only a <p> fragment is generated, with paragraphs separated by a single newline, ready to paste into your own template.
Keywords:newline to pwrap lines in phtml paragraphs