Edit HTML Files Online
Open an .html file from your computer or drop it on the editor, change the code and watch the preview update, then save the edited file. The file is read in your browser and never uploaded.
Open and edit your HTML file
Select Open file or drag an .html file onto the editor. Edit on the left, check the preview on the right, and select Save file when you are done.
Opening a file reads it in your browser; saving downloads an edited copy, because web pages are not allowed to overwrite files on your computer. Files the page links to, such as styles.css or images, are not opened with it. To edit a whole folder, use Open Folder in the HCODX editor.
Edit an HTML file without installing anything
Sometimes you only need to change one thing in one file, on a computer that is not set up for coding.
Typical jobs are small: correcting a price on a page someone sent you, updating the year in an old site's footer, adjusting an exported email template, or finishing a school exercise on a computer where you cannot install an editor. Opening the file here takes a second, and the preview shows the effect of each change before you save.
Web pages cannot write to files on your computer, so saving creates a fresh download with the name in the Save as field. Keep the original until you have opened the new file and checked it, then replace the old one. If you try to leave the page or open another file with unsaved changes, the editor asks first, because nothing is stored after the tab closes.
The preview runs the file's own scripts and loads images and stylesheets that use full https addresses. Anything linked with a relative path, such as css/style.css or images/logo.png, lives next to the file on your computer and is not opened with it, so the preview may look unstyled even though the file is fine.
Open or drop
Choose a file or drag it onto the editor; .html and .htm files up to 2 MB.
Live preview
The page re-renders as you type, scripts included, in a sandboxed frame.
Save a copy
Download the edited file with the original name or a new one.
Change a file safely
A minute of care avoids replacing a working page with a broken one.
Open the file
Select Open file, or drag the file from your file manager onto the editor area.
Find the spot
Click into the code and use your browser's find shortcut, Ctrl+F or Cmd+F, to locate the text to change.
Edit and watch
Make the change and check the preview. If the layout breaks, undo with Ctrl+Z and try again.
Save and replace
Select Save file, open the downloaded copy to confirm it, then replace the original.
For a quick check of the edited markup, paste it into the HTML validator before you replace the original.
Edit text, not structure
Most quick edits change text between tags. Keep the tags themselves as they are.
To update a price or a date, change only the text between the opening and closing tags. Deleting a < or a quote by accident is the most common way a quick edit breaks a page, because the browser then reads the following content as part of a tag.
If the preview suddenly loses its styling or part of the page disappears after an edit, look at the line you just changed for a missing angle bracket or quote.
<!-- Before -->
<tr><td>Sourdough loaf</td><td>$6.00</td></tr>
<!-- After: only the text changed -->
<tr><td>Sourdough loaf</td><td>$6.50</td></tr>When to use a different editor
This page is for one file at a time. Larger work fits better elsewhere.
This editor
Open, change and save a single HTML file in seconds, with no account.
HCODX editor
Open Folder imports a whole site with its CSS, JavaScript and images; export it as a ZIP.
Desktop editor
VS Code and similar editors save straight back to the original file and handle large sites.
HTML file editor questions
Need to edit the whole site?
Use Open Folder in the HCODX editor to bring in every page, stylesheet and image, then export the updated site as a ZIP.
Instant HTML Runner & Viewer with Live Preview
Need to run a short HTML, CSS and JavaScript snippet? The HTML Runner Online has a focused editing surface with live output.
Open HTML Runner Online