Free in-browser editor for text and code files
Last updated: 2026-11-24
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. A PDF opens in the PDF view, where your browser shows the document itself; see PDF files. A JPEG, PNG, GIF, WebP, or BMP image opens in the image view, which shows the picture; see Images. Other images, executables, and other binary files open view-only, so they can't be accidentally corrupted; unusual characters are expected there, and saving is disabled. Recognized files can also get a recommendation for a suitable app; see Opening non-text files. 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.
In Chrome on a computer, Text Editor can open a text file straight from a web link with the free Text Editor extension from the Chrome Web Store.
Text Editor is a text editor, so an image, a PDF, or a video can't be edited here. A PDF opens in the PDF view, where you can read it and open it in PDF Editor (see PDF files), and a JPEG, PNG, GIF, WebP, or BMP image opens in the image view, where you can look at it and open it in Image Editor (see Images). When you open another image, a video, or another file Text Editor can't edit (from your computer, by drag and drop, or from Google Drive), the file first opens as text, view-only, so you can look inside it. When Text Editor recognizes the file, it asks whether to open it in the matching editor: Detected Image offers Open in Image Editor for TIFF and HEIC images, and Detected Video offers Open in Video Editor for videos (see Videos). The file is recognized by its contents, not its name, so an image saved with a .txt extension is still detected. Choose Stay in Text Editor (or press Esc, or close the dialog) to keep the view-only text instead; a message then reminds you that the file does not look like text. A file Text Editor does not recognize skips the dialog and shows only that message.
A file large enough for the large-file prompt is checked before anything opens: if Text Editor recognizes it, the dialog comes first and says what the file appears to be. If you choose the other editor there, the file is not opened in Text Editor; Stay in Text Editor goes on to the large-file prompt. For a large file from Google Drive, the large-file prompt comes before the download and the dialog after it.
A PDF opens in the PDF view: your browser's own PDF viewer shows the document, under a banner with an Open in PDF Editor button. The view is for reading; Text Editor never changes or saves the file. To edit it, choose Open in PDF Editor: PDF Editor opens in a new tab with the file. A PDF is recognized by its contents, not its name, so a PDF saved with a .txt extension opens in the view too, and PDF Editor receives it as a .pdf file. Dismiss hides the banner for this file. The view starts with the menu bar and the toolbar hidden: the Menu button at the right end of the app bar shows the menu bar while you view this file (View > Show menu bar hides it again), and Alt+F10 (or Option+F10 on a Mac) opens the File menu, which also has Open in PDF Editor. Once you click in the document, your browser's viewer keeps the keys you press, so click outside the document first.
To save a copy, use Text Editor's Download button: it saves the PDF under its own name. The download button inside the browser's viewer may not use the file's name.
PDF Editor can edit PDFs up to 100 MB. A larger PDF still opens in the view, and its banner gives the limit instead of the button. A large PDF opens without the large-file prompt, except a PDF over 100 MB from Google Drive, which asks before the download. If your browser can't show PDF files (for example, Chrome on Android), the view shows the file's name, and Open in PDF Editor opens it in PDF Editor.
A JPEG, PNG, GIF, WebP, or BMP image opens in the image view: Text Editor shows the whole picture, scaled down if it is larger than the window, under a banner with an Open in Image Editor button. The view is for looking; Text Editor never changes or saves the file. To edit it, choose Open in Image Editor: Image Editor opens in a new tab with the file. An image is recognized by its contents, not its name, so a PNG saved with a .txt extension opens in the view too, and Image Editor receives it as a .png file. Dismiss hides the banner for this file. The view starts with the menu bar and the toolbar hidden: the Menu button at the right end of the app bar shows the menu bar while you view this file (View > Show menu bar hides it again), and Alt+F10 (or Option+F10 on a Mac) opens the File menu, which also has Open in Image Editor.
The buttons at the top right zoom the picture: Zoom out and Zoom in step between 10% and 400%, the percentage between them shows the picture at its actual size (100%), and Fit to view shows the whole picture again. A zoomed picture scrolls; once you click it, the arrow keys scroll it too. Transparent areas show a checkerboard, a photo is turned the way the camera recorded it, and an animated GIF, PNG, or WebP image plays. To save a copy, use Text Editor's Download button.
Image Editor can edit images up to 100 MB, 100 megapixels, and 20,000 pixels on a side. An image over 100 MB still opens in the view, with Open in Image Editor disabled and the banner giving the limit. An image over 100 megapixels or 20,000 pixels on a side shows the file's name instead of the picture, also with Open in Image Editor disabled and the banner giving the limit. A large image opens without the large-file prompt, except an image over 100 MB from Google Drive, which asks before the download. If the picture can't be shown (for example, a damaged file), the view shows the file's name instead, and you can still try Open in Image Editor. TIFF and HEIC images open as view-only text with the Detected Image dialog (see Opening non-text files).
For MP4, M4V, MOV, WebM, and MKV videos, choose Open in Video Editor in the Detected Video dialog: the video opens in Video Editor in a new tab, and if it opened as text first, the view-only text stays open in Text Editor. A video saved under another name (for example clip.txt) is detected too, and Video Editor receives it under its real extension. Videos have no size limit, but a very large one can take a while to open there.
Known audio files (for example .m4a or .mka, which use the same containers) are not offered. Video Editor checks whether the file holds a supported video track before it opens it, and it saves your edits as a new file. Known limit: a WebM file that holds only audio is still offered, because Text Editor cannot see which tracks a file holds; Video Editor then reports that it could not open the file.
For ZIP, RAR, 7z, TAR, GZIP, BZIP2, and XZ files, Text Editor can recommend ZIP Extractor. Choose Open ZIP Extractor, then select the file in that app. This recommendation opens the app in a new tab; it does not transfer your file automatically. The view-only text stays open in Text Editor.
Office documents (including Pages, Numbers, Keynote, Visio, and XPS files), e-books, and packaged apps are excluded from this recommendation, also when their name does not say what they are. Other binary files have no matching app here; they open view-only as text. For a file that came from Google Drive, View in Google Drive on the message opens Drive's own preview. The same link is on the message after you choose Stay in Text Editor on this recommendation for a file from Google Drive.
The HTML preview renders your page inside a security sandbox that shows only what is in the file itself. Images, stylesheets, and fonts that live on other websites are not downloaded, so an image placeholder or plain styling can appear where the page expects them. When a file references external images or styles, a notice above the preview says so.
To see the page with its external resources, open the file in a browser. Choose Dismiss to hide the notice for the current document.
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.
You can edit a Markdown file in its formatted view as well as in its source. Both views show the same document, and the file stays a Markdown file, including when you save it to Google Drive. Other formats with a rendered preview (HTML, CSV/TSV, XML, JSON, SVG, LaTeX, and RTF, plus a clean reading view for plain text) show a live preview that you read while you edit the text, as described under Other formats below.
Switch views with the selector in the upper right, or under View > Mode:
Markdown files open in the Markdown view, including when you reopen them; there is nothing to turn on. Switching views changes only what you see: it never makes a second copy of the document or turns it into a Google Doc.
Select text, then use the toolbar or the Format menu for bold, italic, headings, lists, quotes, and code, or the usual shortcuts such as Ctrl+B for bold. Undo and Redo work across the views. Formatting adds or changes the Markdown characters around your text; to control the exact syntax, edit it in Text view.
Some content is edited only in Text view, such as tables, HTML, front matter, and display equations. Inline math, images, and checkboxes appear in the text but are not edited in place. If an edit cannot be applied safely, Text Editor leaves the document unchanged and may show a message.
https://example.com, or a link to a heading in the document such as #getting-started. Write other kinds of links in Text view.To change a link, place the caret in its text in the Markdown view and open the dialog again. To remove a link but keep its text, clear the Link field and choose OK. In the Markdown view, clicking a link you can edit places the caret; hold Ctrl while you click to follow it. A web link opens in a new tab, and a heading link scrolls to its heading.
Links written as HTML are edited in Text view. Changing the destination of a reference-style link turns that one link into an inline link; other links that use the same reference keep their destination.
Copying from the Markdown view and pasting with Ctrl+V into a Markdown view can preserve supported formatting. Edit > Paste and the command palette's Paste paste plain text. Pasting from Word, Google Docs, or a web page brings in the text without its styling, and any Markdown punctuation in that text still takes effect, so check the result and use Undo if needed. To copy the Markdown syntax itself, copy it in Text view.
Spaces you type stay visible, and extra blank lines between blocks such as paragraphs and headings show as blank lines you can edit. Blank lines inside lists and quotes, in printouts, and in other Markdown apps may be spaced differently. In Text view, a line of dashes right under a paragraph makes that paragraph a heading; leave a blank line before the dashes for a horizontal rule.
Text Editor does not download images from the web for Markdown files, so an image may show as its description instead, and the image reference stays in the file. Syntax from other Markdown apps, such as wiki links or plugin blocks, may display differently here. Math renders too: write $...$ for inline math and $$...$$ (or a math code fence) for display equations, typeset with KaTeX.
An edit in the Markdown view is saved like any other edit; see Save your file, If the file changed somewhere else, and Autosave and recovery. Check the save status before you close the tab.
For the other formats with a preview, the views are Edit, Split, and Preview. The preview is view-only, so you edit in the editor pane, except in a CSV/TSV table, where you can edit the cells too.
In a CSV/TSV table, 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. The keys work as in a spreadsheet. In Preview, Up, Down or Tab selects the first cell, the arrow keys move from cell to cell and stop at the edge of the table, and Esc clears the selection; in Split, click the table first. To edit a cell, double-click it, press Enter or F2, or type to replace its text. Enter saves and moves down a row, Tab and Shift+Tab save and move right or left, Shift+Enter starts a new line in the cell, and Esc cancels.
Summarize picks out the key passages of a document and shows them, quoted as written. Your document text stays on this device. Check important details against the original.
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 binary files opened as text 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, Ctrl+K link. 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.