WebLab

Free Online HTML, CSS and JS Editor

Write HTML, CSS and JavaScript with a live page beside your code, a console and saved projects, then minify or format HTML, CSS, JavaScript, JSON and SVG, one file or a whole website folder, with nothing uploaded.

Keys while you use the tool: Ctrl Enter runs the page or minifies, Shift Alt F formats, Ctrl S keeps the project, F3 finds and ? shows help. Nothing you type or open leaves this browser.

How to Use WebLab

1

Write or paste your code

Type into the HTML, CSS and JS boxes, paste a whole page into the HTML box, start from a template with New, or open files, a folder or a zip with Open.

2

Watch the page

The page beside the code updates as you type. Pick a phone, tablet or laptop size above it, turn it sideways, or show the page on its own.

3

Read the console

Logs, warnings and errors appear under the page. Click a line number to jump to it in the code, and type JavaScript at the bottom to run it in the page.

4

Keep and share

Your project is kept in this browser once you change it. Save as gives one HTML file or a zip of separate files, and Share makes a link with the code inside it.

5

Minify or format

In Minify or Format, paste code or open a file, choose the language or let the tool tell, pick the level or the indent, and copy or download the result with its sizes.

6

Do a whole site

In Many files, drop a website folder or a zip. Every code file is minified or formatted, the rest is copied, and you download it all as one zip with the folders kept.

Why Use WebLab?

โšก A live page as you type

The page runs beside your code and updates after a short pause; CSS changes apply at once without a reload, and the page keeps its scroll position while you work.

๐Ÿ“ฑ Every screen size

See the page as a 360 or 412 pixel phone, a tablet, a laptop, a full HD screen or a size of your own, scaled to fit, so a layout can be checked without a second device.

๐Ÿงฏ Safe from endless loops

A loop that runs for more than two seconds is stopped and named in the console, and a page that stops answering can be stopped with one button, so a typing slip never freezes the tool.

๐Ÿ—œ๏ธ Minify with numbers

See the size before and after, the gzip size a server would send, what was changed (comments, colours, quotes, tags) and how long it took, with source maps for JavaScript.

๐Ÿงน Readable code again

Format HTML, CSS, SCSS, Less, JavaScript, JSX, TypeScript, JSON and Vue with your indent and line length, also code that was minified, and undo it with Ctrl+Z in the live editor.

๐Ÿ”’ Nothing uploaded

There is no account and no upload. Your code, projects and files stay in this browser, and your page runs in a closed-off frame that cannot reach this site or other tools.

HTML, CSS and JavaScript Explained

๐Ÿงฑ Three languages, one page

HTML gives a page its content and structure, CSS its look and layout, and JavaScript its behaviour. WebLab keeps them in three boxes and joins them into one page, or into one file or a zip of three when you save.

๐Ÿ—œ๏ธ What minifying removes

Browsers ignore comments, most spaces and line breaks, and many quotes and closing tags. Minifying removes them and shortens colours, numbers and JavaScript names, so the file is smaller and loads faster while the page stays the same.

๐Ÿ“ Why gzip matters

Most web servers compress files with gzip or a similar method before sending them. The gzip size is closer to what a visitor actually downloads, so it shows how much minifying really saves on top of that compression.

Frequently Asked Questions

Is WebLab free, and is my code uploaded?

It is free, with no registration. Like every page on ZeroDataUpload, it is supported by advertising. Your code is run, minified and formatted in this browser and is never sent to a server. Your projects and settings are kept in this browser once you change something, so they are still there next time.

Can the code I run here reach this site or my data?

No. Your page runs in a closed-off frame that does not share this site's address, so it cannot read this site's storage, its cookies or the data of other tools. A page that uses localStorage gets a separate one, kept with the project. Files your own code links to, such as a font or a script on another website, load only inside that frame and only because you wrote the link.

What does minifying change, and is it safe?

Gentle removes comments and spaces. Balanced also shortens colours, numbers and quotes and joins CSS rules that sit together. Smallest also drops optional closing tags. Each change keeps what the page shows and does; Smallest may stop the code passing a validator. Keep your original files: minified code is for publishing, not for editing.

Which languages can it format?

HTML, CSS, SCSS, Less, JavaScript, JSX, TypeScript, JSON and Vue files, with your choice of indent (2 spaces, 4 spaces or tabs), line length, quotes, semicolons and trailing commas. Formatting also turns minified code back into something readable.

What happens if my code has an endless loop?

A loop that keeps running for more than two seconds is stopped, and the console names its line, so a slip such as i-- instead of i++ does not freeze the page. If the page stops answering for another reason, a Stop it button appears over the preview.

How big can projects and files be?

Up to 100 projects are kept in this browser, 1,000,000 characters together, because every tool on the site shares the same storage; bigger work can be saved as a file. Minify and Format open files up to 30 MB, and Many files takes up to 5,000 files or 500 MB at once.

How is WebLab different from CodeForge?

CodeForge converts data from one format to another, such as JSON to CSV, XML or YAML, and can give JSON pretty or minified as part of that. WebLab is for web pages: you write and run HTML, CSS and JavaScript, and it minifies or formats them, as well as JSON and SVG, one file or a whole folder.

How WebLab works

Live editor

Write HTML, CSS and JavaScript in their own boxes, or paste a whole page into the HTML box. The page beside it updates as you type; CSS changes show without reloading and the page keeps its scroll position.

Choose a phone, tablet or laptop size above the page, or your own. The console shows what the page logs and its errors with the line they came from (click to jump there), and runs any JavaScript you type into the page.

A loop that runs for more than two seconds is stopped and named in the console, so a slip like i-- cannot freeze the page. Pages may use localStorage: they get their own, kept with the project (up to 100,000 characters).

Your work is kept in this browser once you change something. Projects keeps up to 100 of them; Save as gives one HTML file or a zip; Share makes a link with the code inside it (no server is involved).

Minify

Makes HTML, CSS, JavaScript, JSON and SVG smaller without changing what they do. Gentle only removes spaces and comments. Balanced also shortens colours, numbers and quotes and joins rules that sit together. Smallest also drops optional closing tags and more. The gzip size is what a server that compresses its files would send.

More options has the details for each language, such as shortening variable names, keeping licence comments or making a source map for JavaScript.

Format

Makes code easy to read again, also after minifying. Works for HTML, CSS, SCSS, Less, JavaScript, JSX, TypeScript, JSON and Vue. Choose the indent and line length; More options has quotes, semicolons and commas.

Many files

Drop a website folder or a zip (up to 5,000 files or 500 MB at once). Each code file is minified or formatted with the settings of the Minify and Format tabs; images and fonts are copied, and the zip keeps the folders.

Keys (while you use the tool)

Ctrl Enter
Run the page, or minify or format now
Shift Alt F
Format the open box
Ctrl S
Keep the project, or download the result
F3
Find and replace in the code
Ctrl /
Turn lines into comments and back
Tab
Expand shorthand such as ul>li*3 or m10
Ctrl Space
Show suggestions
?
This help

Private

Everything runs in this browser; nothing you type or open is sent anywhere. Your page runs in a closed-off frame that cannot see this site, its storage or other tools. Files your own code links to load in that frame only because you wrote the link.

The code editor, the JavaScript minifier and the formatter are free, open-source software kept with this tool (licences).

Your projects

Start something new

Your current work stays in Projects.

Share this project

The whole project is packed into the link itself (the part after #, which browsers do not send to a server). Whoever opens it gets a copy in their own browser; nothing is stored on a server.

Editor settings

More options