<br> to line breaks converter

The reverse of nl2br: when text exported from a database or web editor is full of <br> tags, this turns them back into plain lines for a message or file.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter text, merge a line break that already follows the tag and decode entities such as &amp; and &nbsp;.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Every tag matching <br> in any letter case, with or without a slash or attributes, plus </br>, is replaced by a line break. A line break already sitting right after the tag is merged into it so lines do not double, and common entities such as &amp; and &nbsp; can optionally be decoded.

Example

Inputs: Merge a line break that already follows the tag = yes, Decode entities such as &amp; and &nbsp; = no. Result: Result: King Fahd Road Riyadh 12211 Saudi Arabia; br tags replaced: 2.

King Fahd Road<br>Riyadh 12211<br />Saudi Arabia
King Fahd Road
Riyadh 12211
Saudi Arabia

Limits and caveats

  • Only br tags change; tags such as <p> and <div> stay as they are. To remove every tag use the HTML to plain text tool.
  • A tag inside an HTML comment or an attribute value is replaced too, since the tool does not parse the page structure.

Questions about this tool

How is this different from HTML to plain text?

This replaces only br tags and keeps the rest of the markup, while HTML to plain text removes every tag.

Why do I get an extra blank line?

The original text has a newline after each <br>. Keep the merge option on so the two count as one line break.

Does it catch every way of writing the tag?

Yes, including <br>, <br/>, <br />, <BR>, <br class="x"> and </br>, which browsers also treat as a line break.