Home › Developer Tools › Online Code Editor

Online Code Editor

Write and edit code in a fast, VS Code-style editor right in your browser. Open several files in tabs, get syntax highlighting for more than 50 languages, search and replace, and pick up where you left off: everything is saved in this browser automatically.

Last updated:

Loading the code editor…
Ln 1, Col 1 Saved in this browser

Tip: drop files onto the editor to open them. Double-click a tab to rename it; the language follows the file extension. Press F1 for the command palette.

Advertisement
Advertisement

How to use the Online Code Editor

  1. Start typing in the sample files, or click New file (or +) to open an empty tab.
  2. Open your own files with Open files or by dragging them onto the editor. The language is picked from the file extension; change it with the Language menu.
  3. Edit like in VS Code: Ctrl+F to find, Ctrl+H to replace, Alt+click for multiple cursors, Shift+Alt+F to format and F1 for every command.
  4. Rename a tab by double-clicking it. Adjust the theme, font size, indentation, minimap and word wrap in the options row.
  5. Save your work with Save file (Ctrl+S) or Download all (.zip). Your tabs are also kept in this browser for your next visit.

Keyboard shortcuts

The editor uses the same key bindings as Visual Studio Code. On a Mac, use ⌘ instead of Ctrl and ⌥ Option instead of Alt.

ShortcutAction
Ctrl + SSave the current file (to disk or as a download)
Ctrl + OOpen files from your computer
Alt + NNew file in a new tab
Ctrl + F / Ctrl + HFind / find and replace (with regex, match case and whole word)
Shift + Alt + FFormat the document
F1 or Ctrl + Shift + PCommand palette with every editor command
Ctrl + GGo to line
Ctrl + DSelect the next occurrence of the current word (add a cursor)
Alt + clickAdd another cursor
Alt + ↑ / ↓Move the current line up or down
Shift + Alt + ↓Duplicate the current line
Ctrl + /Toggle line comment
Ctrl + Shift + [ / ]Fold / unfold the current block
Ctrl + SpaceShow suggestions

How autosave and files work

Each tab is stored in your browser's localStorage about half a second after you stop typing, together with which tab was open. The status bar shows Saved in this browser when that succeeded. Storage is tied to this browser profile on this device: it does not sync to other computers, and private windows forget it when they close. A dot on a tab means the file changed since you opened it or last saved it to disk.

When you open files in Chrome or Edge, the editor uses the File System Access API, so Save file can write straight back to the original file after you grant permission. That link lasts until you reload the page. In other browsers, saving downloads a copy, and Download all (.zip) packs every tab into one archive with its file name.

Tips

  • Change the language by renaming: rename untitled-1.txt to main.py and Python highlighting turns on. For a new untitled file, picking a language also changes its extension.
  • Use regex in Find: click the .* button in the find box. Replace supports capture groups such as $1.
  • Edit columns at once: hold Shift + Alt and drag to make a box selection across lines.
  • Compare two versions of a file with the Code Diff Checker, or turn a snippet into a shareable picture with Code to Image.

Frequently asked questions

Is this the same editor as Visual Studio Code?

It uses Monaco, the open-source editor component that Visual Studio Code is built on, so editing, shortcuts, highlighting, find/replace and the command palette work the same way. Extensions, a terminal, debugging and Git are part of the full VS Code app and are not included.

Which programming languages are supported?

Syntax highlighting covers more than 50 languages, including JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin, SQL, HTML, CSS, SCSS, JSON, YAML, XML, Markdown, Shell, PowerShell, Dockerfile, Lua, R and Dart. JavaScript, TypeScript, JSON, HTML and CSS also get IntelliSense-style suggestions and error checking.

Where are my files saved?

Every tab is saved automatically in your browser's local storage on this device, so it is still there when you come back. Nothing is uploaded to a server. Clearing your browsing data or using a private window removes it, so save important files to disk.

Can I save changes back to the original file?

Yes, in Chrome and Edge on desktop. Files opened with Open files are linked to the original, and Save file (Ctrl+S) writes your changes back after you allow it. Other browsers download a copy instead.

Can I run my code here?

No. This is an editor, not a compiler or runtime. To see HTML, CSS and JavaScript working live, use the HTML Editor with live preview; for other languages, save the file and run it with your usual tools.

Is there a file size limit?

Files up to 5 MB can be opened. Browser local storage usually holds about 5 MB per site in total, so if the status bar says your work could not be saved, download your files and close tabs you no longer need.

Does it work on phones and tablets?

It works in modern mobile browsers, but code editing is much more comfortable with a physical keyboard. On small screens you may want to turn off the minimap and turn on word wrap.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

HTML Editor (Live Preview)Write HTML, CSS and JavaScript and see a live, sandboxed preview as you type.Code Diff CheckerCompare two code files side by side or unified, with syntax colors and changes highlighted.JSON FormatterBeautify, minify and validate JSON, with a collapsible tree view.Code to ImageTurn code into a beautiful syntax-highlighted PNG with themes, window frame and background.Code Typing TestTyping test with real code in JavaScript, Python, HTML, CSS and more: WPM, accuracy and symbol errors.Online Python CompilerRun Python 3 in your browser with input(), numpy, pandas, charts and share links.JSON EditorEdit JSON in a tree and as code side by side: add, rename, drag, change types, undo and download.Unzip FilesOpen and extract ZIP files online.RAR & 7z ExtractorOpen RAR, 7z and other archives online and extract files.Regex TesterTest and debug regular expressions live.File Info ViewerCheck file size, type, date and MD5/SHA hashes.SQLite ViewerOpen .db and .sqlite files in your browser, browse tables and run SQL queries.DOCX ViewerOpen and read Word .docx files in your browser, then print or save them as HTML.EPUB ReaderOpen and read EPUB e-books in your browser with pages, a table of contents and font controls.What Is My BrowserSee your browser, version, OS, engine, screen and which web features it supports.Font ViewerPreview TTF, OTF, WOFF and WOFF2 fonts with sample text, waterfall, glyphs and metadata.Markdown EditorWrite Markdown with a toolbar, live split preview, autosave and .md or HTML export.Regex Cheat Sheet75+ ready-to-use regex patterns for emails, URLs, IPs and dates, each with a live test box.JavaScript Keycode FinderPress any key to see its JavaScript key, code, keyCode, which, location and modifiers.QR Code ScannerScan QR codes with your camera or from an image and safely read the link or text.RAID CalculatorUsable capacity, efficiency and fault tolerance for RAID 0, 1, 5, 6, 10, 50 and 60 arrays.JSONPath TesterTest JSONPath expressions live: filters, slices, wildcards and recursive search, with matches highlighted.Mermaid Diagram EditorWrite Mermaid code and see flowcharts, sequence, Gantt and ER diagrams live. Export SVG or PNG.Country Codes ListSearch ISO 3166 alpha-2, alpha-3 and numeric country codes with calling codes and TLDs.CSS Selector TesterTest CSS selectors on your HTML: highlighted matches, match count and specificity.Git Cheat SheetSearchable Git command reference by task, with copy buttons and an undo/rename/fix wizard.HAR File ViewerOpen a .har file to see a waterfall timeline, headers, bodies, timings and size totals.jq PlaygroundRun jq filters on JSON in your browser with live output, flags and an example library.Markdown Cheat SheetInteractive Markdown syntax reference: edit every example and see the live rendered preview.Regex ExplainerPaste a regular expression and get a plain-English breakdown, railroad diagram and flag notes.XPath TesterTest XPath expressions on XML or HTML: highlighted matches, node paths, values and examples.EML File ViewerOpen .eml email files to read the message, headers and raw source and save attachments.Graphviz Online ViewerWrite Graphviz DOT code and render graphs live; switch layout engines, export SVG or PNG.JavaScript Online CompilerWrite and run JavaScript in your browser with a console, timing, error lines and share links.Jupyter Notebook ViewerOpen .ipynb files and read code, Markdown, math, tables, plots and errors without Python.LaTeX Table GeneratorEdit a table like a spreadsheet or paste from Excel and get LaTeX tabular or booktabs code.Log File ViewerOpen huge log files with level colors, regex and time filters, JSON pretty-print and tail -f.Logic Gate SimulatorBuild logic circuits with AND, OR, NOT, XOR gates and flip-flops; see live outputs and truth tables.JMESPath TesterEvaluate JMESPath expressions against JSON live, the query language used by the AWS CLI.MongoDB Query TesterTest MongoDB find filters, projections and aggregation pipelines on sample JSON documents.Semantic Version CalculatorBump, compare, sort and test SemVer versions against npm ^, ~ and x ranges.XSLT TesterRun an XSLT 1.0 stylesheet on XML in your browser and see the output as HTML, XML or text.ASCII Diagram EditorDraw boxes, arrows and text on a character grid and copy plain-text diagrams for code and READMEs.DBF File ViewerOpen dBase .dbf files and shapefile tables, search and sort records, export CSV or XLSX.MBOX File ViewerOpen .mbox mail archives: list and search messages, read them, save attachments, export EML.MDB File ViewerOpen Access .mdb and .accdb databases in your browser: list tables, view rows, export CSV.Shapefile ViewerView zipped shapefiles on a map with the attribute table, then export to GeoJSON or CSV.MSG File ViewerOpen Outlook .msg emails in your browser: sender, recipients, body, headers and attachments.Online Hex EditorOpen any file as hex and ASCII, edit bytes, search, inspect values and save the result.PHP Online CompilerRun PHP 8 code in your browser with output, HTML preview, error lines and share links.PlantUML EditorWrite PlantUML and see sequence, class, activity and more diagrams live. Export SVG or PNG.Sorting Algorithm VisualizerWatch bubble, insertion, merge, quick, heap and radix sort step by step with live counters.Lottie ViewerOpen Lottie JSON or .lottie files to play, pause, scrub frames, change speed and see details.Diff ViewerPaste a git diff or .patch file and view it side by side or inline, with file navigation.EditorConfig GeneratorBuild an .editorconfig with indent, charset, line endings and trim rules per file pattern.Folder Compare ToolCompare two folders by file list, size and SHA-256 hash, then open a text diff of changed files.Glob Pattern TesterTest glob patterns like **/*.js, {a,b} and !exclusions against a list of file paths.
See all 53 Code Playgrounds & Testers →