Skip to content

Online HTML editor and cleaner

Format text in the visual editor and watch the HTML code update next to it. Or paste messy HTML and clean it with one click.

0 words0 characters0 tagsSaved in this browser
Only need words, no formatting? The plain text editor with autosave is simpler.

    Commands change the whole document. Ctrl Z undoes them.

    Advertisement
    A sheet split in two: a neat paragraph on the left and its HTML tags on the right

    Last checked by the TextEditor.com team

    How to use the online HTML editor

    Write and format in the visual side, like in a word processor. The code side shows the HTML for it and updates as you type. You can also type or paste code on the code side, and the visual side follows.

    1. Format your textUse the toolbar for headings, bold, lists, links and tables.
    2. Clean itClick Clean and pick a preset. The report says what was removed.
    3. Copy or saveClick Copy code and paste it into the HTML block of your site, or save an .html file.

    Your document saves in this browser as you work, like in the plain text editor. Nothing is sent to our server.

    Convert Word or Google Docs to clean HTML

    Copy your document in Word or Google Docs and paste it into the visual side. A paste from Word brings a lot of extra code: font names on every line, mso styles that only Word reads, class names and empty paragraphs. Google Docs wraps text in spans with long style lists.

    That's why the editor keeps only the structure by default: headings, lists, links, bold and italic. A note under the editor lets you keep all the formatting or paste plain text instead.

    A real Word paste, before and after "For WordPress"
    
    

    What each cleaning option removes

    OptionBeforeAfterKeep it for email?
    Word and Google Docs junk<p class="MsoNormal"><p>No, remove it
    Inline styles<p style="color:red"><p>Yes. Email apps ignore most style sheets.
    Classes and IDs<p class="intro"><p>No, email has no style sheet to match them
    All attributes except href, src and alt<img src="a.png" width="80"><img src="a.png">Yes, keep them. Width and height help email layouts.
    Span and font tags<span>Hi</span>HiOnly if the spans carry colors
    Runs of non breaking spaces9&nbsp;&nbsp;&nbsp;to 59 to 5No, remove them
    Tags with only a non breaking space<p>&nbsp;</p>(nothing)No, use margins instead
    Empty tags<b></b>(nothing)No, remove them
    Comments<!-- note -->(nothing)Keep the ones that start with [if mso]

    "Text only" removes every tag and leaves the words in paragraphs. To change the case of headings after cleaning, use the case converter.

    Visual editor or code: what does WYSIWYG mean?

    WYSIWYG means "what you see is what you get". You see the finished text, and the editor writes the tags for you. Point at a word below to see which tags it makes.

    Words and their tags

    We bake fresh bread every day. Find us at the market.

    <p>We bake <strong>fresh</strong> bread <em>every</em> day. Find us at <a href="/map">the market</a>.</p>

    Is it safe to paste HTML from other sites?

    HTML can carry code that runs when the page opens. A script tag, an onclick attribute or a link that starts with javascript: can all run code. On this page, that code could read what you type. So the editor removes them before anything reaches the visual side, the preview or a shared link.

    The preview runs in a sandbox: a frame where scripts can't run at all. A shared link always opens as a preview first, so you can look before you load it. Click the button below to see what gets removed.

    What the safety filter removes
    <p onclick="stealData()">Win a prize!</p>
    <a href="javascript:alert(1)">Claim it</a>
    <img src="cat.jpg" onerror="stealData()" alt="Cat">
    <script>stealData()</script>

      Bold, italic and headings in HTML

      TagMeansLooks likeScreen readers
      <strong>Important textboldSome voices stress it
      <b>Stands out, no extra meaningboldRead like normal text
      <em>Stress, like when you say it louderitalicSome voices stress it
      <i>Titles, foreign words, termsitalicRead like normal text
      <h1> to <h6>Headings, from the page title downBig to smallAnnounced as "heading level 2"

      Use one h1 for the page title, then h2 for sections and h3 inside them. Don't skip from h2 to h4: screen reader users jump by headings and may think a part is missing. The status bar under the editor warns you when a heading skips a level.

      Social apps like Instagram don't read HTML. For those, use the bold text generator. It makes bold letters from special Unicode characters. Need an arrow or a © sign? Find it with its code in special characters and HTML entities, or look up ASCII codes.

      Keyboard shortcuts and hidden tools

      Tool or shortcutWhat it doesExample
      Tools, Ctrl + KEvery command in one list. Type to find one.Type "minify" and press Enter
      Tag toolsDelete, unwrap or rename tags, or list their valuesDelete img tags that have no alt
      Find and replaceSearch the text, the code or attribute values, with patternsChange every http:// link to https://
      Placeholder textAdds Lorem ipsum paragraphs for a layoutCtrl+K, then "lorem"
      Share as linkPacks the page into a link. Nothing is uploaded.Send a draft to a friend
      Ctrl + SSaves an .html fileIn Chrome and Edge it saves back to the opened file
      Shift + EnterLine break inside a paragraphAddresses and poems

      More tools for web text

      Frequently asked questions

      Is this HTML editor free? Do I need to sign up?

      It is free, and there is no account. Ads on the page pay for the site.

      How do I get the HTML code of my text?

      Type or paste your text into the visual side. The code side shows the HTML. Click Copy code to copy all of it.

      How do I remove all inline styles from HTML?

      Click Clean, tick "Inline styles" and click "Clean the ticked parts". The "For WordPress" preset removes them too.

      Can I convert a Word document to HTML here?

      Yes. Open the document in Word, select all, copy, and paste it into the visual side. Then use the "For WordPress" preset. A .docx file can't be opened here directly.

      Why did my script or iframe disappear?

      The editor removes scripts and code in attributes like onclick, because they could run on this page. Frames stay only for videos and maps from YouTube, Vimeo, Dailymotion, Google Maps, Spotify and SoundCloud. Add other frames in your own site's editor after you paste the HTML.

      Where is my document saved? Can I share it?

      It is saved in this browser on your device. Share as link packs the page into the link itself, so it is never stored on our server. Long pages make long links.

      Will the HTML work in WordPress, Shopify or an email newsletter?

      Yes. Paste it into the HTML or code block of your editor. For email, use the "For email" preset, which keeps inline styles, because most email apps ignore style sheets.

      What is the difference between this and the plain text editor?

      The plain text editor keeps only letters and line breaks. This one adds bold, links, tables and pictures, and gives you the HTML code.

      Can I edit an existing web page by its URL?

      No. Fetching other sites would send your request through our server. Open the page in your browser instead, press Ctrl+U to see its source, and copy the part you need into the code side.

      Where can I get filler text for a layout?

      Use the lorem ipsum generator. It gives placeholder text as HTML paragraphs or a list, ready to paste into the code side.

      • Text editorWrite and edit plain text in your browser.
      • Case converterPaste text and change it to UPPERCASE, lowercase, Sentence case or Title Case in one click.
      • All charactersFind any Unicode character by name or code, copy it, and get its HTML entity, CSS and JavaScript code.
      • ASCII tableAll 128 ASCII codes with decimal, hex, octal, binary and HTML values.
      • All emojiSearch every emoji by name, keyword or code, pick a skin tone and copy.
      • Bold textTurn plain words into bold letters for bios, posts and comments.

      ↑ ↓ to choose, Enter to open, Esc to close