Free in-browser editor for text and code files
Last updated: 2026-09-02
This page explains how to use Text Editor, a free in-browser editor for text and code files. If you don't see what you need, check the FAQ or contact support.
Text Editor opens text and code files straight from your computer. No upload and no sign-up; the file is read right in your browser.
Text Editor opens plain-text and code files in many formats: TXT, Markdown, CSV/TSV, JSON, XML, HTML, CSS, SVG, LaTeX, RTF, JavaScript, Python, Java, C/C++, and many more. It detects the language from the file extension and turns on the matching syntax highlighting.
Text Editor checks for binary files before opening them. Images, PDFs, executables, and other binary files are refused up front, so they can't be accidentally corrupted. If you choose "Open as text anyway", the file opens view-only; unusual characters are expected there, and saving is disabled. Text that opens normally but looks wrong is usually an encoding question instead; see Text encoding.
You can open a text or code file that lives in Google Drive. Using Google Drive is the only part of Text Editor that needs a Google sign-in; local files and new documents work without an account.
Text Editor uses the limited drive.file scope. That means it can only see the specific files you pick or create with it, never your whole Drive. Google's picker controls which file is shared, and Text Editor never has standing access to anything else.
Files opened from Google Drive can be saved right back to Drive with Save (Ctrl+S), and the File menu adds Drive extras like Share, Move, and Version history. See Save your file.
This section applies to Google Drive operations: opening a file, saving back to Drive, making a copy, and the Drive extras like Share, Move, and Version history. Some failures are temporary connection hiccups; others come from permissions, file status, or the selected Google account. Text Editor points at the cause when it can.
Some download failures have their own cause and fix: the file hit its download limit, the owner disabled downloads, or Google flagged the file.
Google Drive limits how often any single file can be downloaded in a short period. When a file hits that limit, Drive temporarily blocks further downloads of it, for everyone and from every app, and Text Editor shows: "Google Drive has temporarily limited downloads of this file. Wait a few hours and try again"
Google Drive lets a file's owner turn off downloading, printing, and copying for people who only have view or comment access. When that setting is on, Drive refuses to hand the file's contents to any app, including Text Editor, and you'll see: "The owner of this file has disabled downloads"
Google Drive scans shared files and flags ones that look like malware, spam, or other abuse. Once a file is flagged, Drive blocks everyone except the file's owner from downloading it, and Text Editor shows: "Google Drive flagged this file as malware or spam. Only the file owner can download it"
Text Editor is a full editor powered by Ace. Once a file is open, you can edit it the way you would in a desktop code editor. Commands live in a familiar menu bar (File, Edit, View, Format, Tools, and Help), with the most-used actions repeated on the toolbar.
The sections below cover the most common tasks: finding and replacing text, jumping to a line, editing with multiple cursors, adjusting word wrap and font size, and choosing themes and dark mode.
Encoding is how a file's raw bytes are turned into readable characters. Most files today use UTF-8, and Text Editor reads files as UTF-8 by default. Files made by older tools or in some languages may use another encoding (for example Shift JIS, Windows-1252, or ISO-8859-1). When a file's encoding does not match how it is read, the text looks garbled, with stray symbols, wrong accents, or question-mark boxes. This is called mojibake.
When you open a file, Text Editor keeps a reference to the file's original bytes so it can re-read them later; that is what powers the encoding menu and encoding autodetect. For safety, your browser cancels that reference the moment the file changes on disk. If you then pick an encoding, Text Editor can no longer re-read the original bytes and shows: "Couldn't re-read the file. It changed on disk since it was opened"
After you save a file with Text Editor, the file on disk is UTF-8, because the editor wrote those bytes itself. There are no other original bytes left to re-interpret, so the encoding menu is disabled until you open another file. See Text encoding for how saving and encodings interact.
Search the file for any text, and optionally replace what you find.
Find and replace lets you match case, match whole words, use regular expressions, and limit the search to your current selection, so you can narrow results to exactly what you mean. Find all selects every match at once, which is handy for editing them together with multiple cursors.
Jump straight to a specific line number instead of scrolling.
This is handy when a compiler, linter, or stack trace points you at a specific line.
Edit in several places at once by adding more than one cursor. Whatever you type appears at every cursor, which is great for renaming variables or editing repeated lines.
Press Esc to collapse back to a single cursor.
Adjust how the text is displayed to suit the file you're working on and your screen.
Turn View > Options > Wrap text on to make long lines fold to the width of the editor instead of running off the right edge. This is useful for prose, Markdown, and log files. Turn it off to keep each line on a single row, which is often clearer for code.
Make the editor font larger or smaller with View > Increase font size / Decrease font size (Ctrl+Shift++ / Ctrl+Shift+-). A larger size improves readability; a smaller size fits more lines on screen at once. You can also pick a different monospace font under View > Font.
View > Options holds the rest of the per-document display settings: indent wrapped lines, show invisible characters, show indent guides, highlight the active line and the selected word, a print margin guide at 80 or 100 columns, your choice of cursor style, and right-to-left text for languages that need it. Format > Tabs switches between real tabs and two or four spaces, and Format > Line can move, duplicate, or sort lines.
Text Editor has two appearance settings. The app theme can be System, Light, or Dark, and System follows your operating system. The editor theme controls the colors of the document itself, with nine light and nine dark choices.
Choose View > Theme to open the theme chooser. Editor themes preview live as you move through the list; choose OK to keep one, or Cancel to go back to what you had. The App theme control in the same chooser switches between System, Light, and Dark. Your choices are remembered the next time you visit, so the editor opens the way you left it.
These help and info pages have their own light/dark control: the circular button in the page header cycles between System, Light, and Dark.
For supported formats (Markdown, HTML, CSV/TSV, XML, JSON, SVG, LaTeX, and RTF, plus a clean reading view for plain text), Text Editor can show a live rendered preview so you can see how the result will look as you type. The preview is view-only: editing always happens in the editor pane.
Switch between Edit, Split, and Preview at any time under View > Mode. The Markdown preview renders headings, lists, links, code blocks, and other standard Markdown formatting, and the Format menu offers one-click Markdown formatting: bold, italic, headings, lists, quotes, and code. In the CSV/TSV preview, click a column header or a row number to select it and copy it as tab-separated text with the Copy chip that appears, or click a single cell and copy it with Ctrl+C.
Save (Ctrl+S) writes your changes back to wherever the file lives, and the save status in the app bar shows when everything is saved. If the file was changed somewhere else in the meantime, Save asks before overwriting (see If the file changed somewhere else), and view-only files cannot be saved over their source.
You can rename the open document at any time with File > Rename. For files that live in Google Drive, the File menu adds a Google Drive submenu with Make a copy, Move, Open, Locate, and Version history, plus a top-level Share command that opens Drive's own sharing dialog.
While a file is open here, the same file can also change somewhere else: someone edits it in Google Drive, or another program on your computer writes to it. Instead of silently overwriting anyone's work, Text Editor notices and shows a warning banner: "This file changed in Google Drive (or on this computer) since you opened it. Saving now will overwrite the other version."
Some files open in view-only mode: you can read them, but the editor won't let you change or save them. A banner above the editor tells you when this is the case, and why.
Everything that doesn't change the file: reading, selecting, copying text out, find, and go to line.
For a Drive file that is view-only because of permissions, make your own copy: File > Google Drive > Make a copy creates an editable copy in Google Drive and opens it in a new tab, and File > Edit locally or File > Download a copy puts an editable copy on your device. The copy is yours; the original stays untouched. Extremely large files and files opened with "Open as text anyway" stay read-only for safety.
Print your document straight from the editor with File > Print (Ctrl+P, or Cmd+P on a Mac). Text Editor's own print dialog lets you choose what to print (the document text or the rendered preview), along with orientation, paper size, margins, and text size, and whether to include line numbers, syntax colors, or a header and footer, before handing the job to your browser's print dialog. From there you can send it to a printer or save it as a PDF. For a quick PDF with sensible defaults, File > Save as PDF skips the options and goes straight to your browser's print dialog, where you can pick Save as PDF as the destination.
Text Editor helps protect your work in two ways: autosave writes your edits to the file automatically, and recovery drafts add a local safety net for unsaved changes.
Recovery drafts are a safety net, not a permanent backup. They live only in this browser on this device, and clearing your browser data will remove them. To keep a lasting copy, save your file (see Save your file).
Text Editor supports the standard editing shortcuts. On a Mac, use Cmd where the list shows Ctrl unless noted. For the complete, up-to-date list, open Help > Keyboard shortcuts (Ctrl+/) in the app.
In Markdown files, the usual formatting keys work too: Ctrl+B bold, Ctrl+I italic, Ctrl+U underline. The editor also supports many more shortcuts for indenting, commenting, and navigating, the standard set you'd expect from a code editor.
Browsers restrict how web pages may reach the system clipboard, so the Edit-menu clipboard commands sometimes get blocked; the keyboard shortcuts never are. Use Ctrl+C to copy, Ctrl+X to cut, and Ctrl+V to paste (Cmd on a Mac). If the browser shows a clipboard permission prompt, allowing it also unblocks the menu Paste command (Copy and Cut do not need a prompt).
Text Editor runs entirely in your browser. Your files are processed locally on your device.
drive.file scope, so Text Editor can only access the specific files you pick or create with it, never your whole Drive. When you save a Drive file, your changes go from your browser directly to your own Drive.For more about the Google permissions Text Editor uses, see the FAQ.