Files, Encodings & Formats

How to open any file as text on Mac

You can do this with Note My, and here is how to look inside a file with no extension, a type macOS calls binary, or a name the system has handed to something else — and how to tell when the encoding is the real problem.

Some files will not open in a text editor no matter how obviously they are text. A configuration file with no extension. A rotated log called access.log.1. A .dump, a .dat, a .bak. A dotfile the Finder will not show you. Double-click and macOS either opens the wrong application or says it does not know what the file is.

The file is usually fine; the label macOS put on it is what failed. This guide covers how to open a file the system will not classify with Note My, what the binary warning means, and what to check when the file opens but reads as nonsense.

Why some files refuse to open in a text editor

macOS judges a file mostly by its filename extension. A file called settings has no type the system reads as text, so nothing is offered for it. A file called report.dat has a type, but one the system may have assigned to something else entirely. Neither case says anything about the bytes inside.

Note My takes the opposite position. It opens anything you hand it and takes over nothing in return. For the ordinary text types — source code, scripts, plain text, JSON, XML, YAML, HTML and CSS — it offers itself in the Finder's Open With list without becoming the default for any of them. Everything else opens the moment you ask for it by name, whatever macOS decided the file was.

It all happens on your Mac: nothing is uploaded, there is no account, and the file never leaves the machine.

Note

Opening an unclassified file is always something you ask for, and it happens the moment you ask for it. Installing the app changes none of your existing defaults, so everything else on your Mac carries on opening exactly where it opened before.

Open Anything as Text…

  1. Choose the command

    Press ⇧⌘O, or use File ▸ Open Anything as Text…. This is the command for a file the app would not normally claim: no extension, an unfamiliar extension, or one the system has assigned elsewhere. The ordinary ⌘O still handles anything the system already knows is text.

  2. Pick the file, including the hidden ones

    A file whose name begins with a dot is hidden by the Finder, not by the app. Reveal hidden files in the open panel with the system's own toggle and select it as normal, or drag it onto the tab bar.

  3. Answer the binary warning if it appears

    If the file looks like something other than text, you are warned before it opens, so you get to decide whether to carry on. The warning is on by default and lives in Settings ▸ Encoding (⌘,) as a switch you can turn off.

  4. Check the language in the status bar

    A forced-open file usually opens as Plain Text, and for a file like this that is usually the right answer. Click the Identify pill in the status bar to open the Language Inspector, which reports "Identified programming language: X" and offers an override pop-up with Confirm and Cancel.

Files with no extension, unfamiliar extensions and dotfiles

Once the file is open it behaves like any other document in the app, and our advanced language identifier settles the language as the tab appears. A name it recognises is enough on its own — a .rb, a .swift, a .php that macOS had handed to something else entirely arrives coloured the moment you force it open, with nothing for you to choose. For a name that says nothing at all, the language is one click away in the status bar, and every other part of the editor is yours either way: search, invisibles, line endings, the comparison view.

For the files this guide is about, the answer is often Plain Text. A .env, a Dockerfile, a Makefile and an extensionless script all settle there, and the same file opens the same way every time. That is the steady answer you want for a file you are inspecting rather than authoring: everything is readable, everything is editable, and nothing about the file has been changed to get it on screen.

If you know better, say so. The Identify pill in the status bar opens the Language Inspector, and its override pop-up lets you pick a language and Confirm it. A language you set yourself is never overruled afterwards, so it stays put for that tab. Save the file with the extension it should have had and the choice comes back with it, coloured and identified, every time you open it after that.

Plain Text earns its place. It turns on the system's own spell and grammar underlines, so the prose inside a README, a comment block or a note to yourself is checked as you read. What it never does — what nothing in the app ever does — is mutate your text: no automatic spelling correction, no smart quotes, no dash substitution, no link or data detection. Which matters most for exactly these files, where a curly quote breaks a script.

The binary warning, and whether to go ahead

The warning appears when the file looks like something other than text — a compiled object, an image, an archive, a database. It is a caution, not a refusal: Note My says what it makes of the file and then does what you tell it.

Going ahead is worth it whenever you expect structured text with a stray byte in it — a truncated log, a file that got a header prepended, an export in an unusual encoding. Whatever decodes arrives readable, and in a file that is part text and part something else the readable part is usually what you came for: a version string, an embedded path, the line where the export stopped. Our find and replace will pull it out of the surrounding noise in one search.

Warning

Treat a forced open of a binary file as a read. Opening writes nothing to disk, so you can look as long as you like and close the tab with the file exactly as you found it. If you mean to save edits back into something that was not text to begin with, duplicate it in the Finder first and work on the copy.

Other ways to get the file open

The keyboard command is not the only route, and another is often quicker.

Ways to open a file that macOS does not classify as text
RouteWhat it does
Drag onto the tab barDrop one or more files from the Finder onto the tab bar; each opens in its own tab.
Drop on the welcome screenWith no document open, the hint line reads "Tip: Drag & drop files here • ⌘O to Open • ⌘N for New" and flips to "Drop to open" while you drag.
Finder right-clickThe Note My ▸ submenu offers Open, Open in Background and, with several files selected, Concatenate & Open. Its Open verb is the same forced-open path as ⇧⌘O.
Services menuOpen in Note My, there as soon as the app has been run, with no logging out.
Open WithNote My is offered in the Finder's Open With list for files the system already treats as text, without ever becoming the default for them.

There is also a local notemy:// URL scheme with three verbs: open, openfolder (up to 50 files at a time, sorted, leaving hidden files and packages where they are) and compare. Hand it a URL from anywhere on your Mac and the files land in tabs, ready to read. It reads files into the editor and nothing else: it runs nothing, uploads nothing, and writes nothing back to disk on its own.

If it opens as gibberish, the encoding is the real problem

A file that opens but reads as accented mush was decoded with the wrong encoding. That is a separate failure from the one this guide started with, and it has its own fix.

Use File ▸ Encoding ▸ Reload with Encoding… and pick the encoding the file was actually written in. Reloading shows you the same file read the way you chose, and changes nothing on disk. Convert to Encoding… is its opposite: it changes what gets written the next time you save. Do not reach for Convert when you meant Reload.

Our encoding handling offers eighteen encodings: ten Unicode variants, four legacy Western (Windows-1252, ISO-8859-1, Mac Roman, KOI8-R) and four CJK (Shift JIS, EUC-JP, GB18030, Big5). File ▸ Encoding and the status-bar encoding pill both open with a short frequent section — UTF-8, UTF-8 with BOM, UTF-16 LE BOM, UTF-16 BE BOM, Windows-1252, ISO-8859-1, Mac Roman — followed by the rest in groups. If an older Western file still reads wrongly, try Windows-1252 first: it is the right answer for a great deal of legacy Western text, and trying another costs nothing. Reload as often as you like — the file on disk is untouched, and every attempt happens on your Mac with nothing uploaded.

Troubleshooting

The "Note My ▸" menu is not in my Finder right-click menu

Finder extensions are off until you enable them. Turn it on in System Settings, or from page 8 of the app's onboarding, where a live card offers an Enable… button and shows a green On badge once the extension is running.

The tab says Plain Text but the file is clearly code

Nothing has gone wrong. Plain Text is a working answer rather than an error: the file is fully editable, the whole document is there, and nothing in it has been altered. Colour is one click away: set the language yourself from the status-bar Identify pill, which opens the Language Inspector with an override pop-up, and our syntax engine paints the document as soon as you Confirm. A language you choose is never overruled later. Saving the file with a matching extension makes it permanent.

The whole file arrived as one enormous line

That is a line-ending mismatch. The status bar's line-ending pill tells you what you are looking at: Mixed when the file uses more than one style, None when there are no line breaks at all, and otherwise the style in use. File ▸ Line Endings ▸ Show Line Ending Details… gives you the full picture, and the same menu converts to LF, CRLF or CR.

I want to work through a whole folder of files

The folder verb opens up to 50 files in one go, sorted, leaving hidden files and packages where they are — enough to put a morning's worth of logs or a directory of configuration in front of you at once, each in its own tab. When you want to reach into a tree rather than open it, Search ▸ Find in Folder… (⇧⌘F) searches the text files underneath the folder you point it at and lists the hits, so you open only the files that actually mention the string you are chasing.

A forced-open file is enormous and everything feels heavy

Very big documents are carried by our large-file engine, so the window stays usable while the file arrives and responsive once it is there: you can scroll, search and edit a multi-megabyte log without the app stalling. A large-file indicator in the status bar tells you at a glance which sort of document you are in, so you always know what you have in front of you. Our find and replace stays quick at that size, and Search ▸ Go to Line… takes you to a line number the instant you type it, so the way through a very large forced-open file is to search for the string you want and land on it rather than to scroll for it.

What to do once the file is open

Getting the file on screen is the start of the job rather than the end of it. Everything the editor does for an ordinary document it does for this one, which is usually the reason you wanted it open in the first place.

  • Find the character that broke it. Our hidden-character scanner marks what you would otherwise never see — a non-breaking space where a plain space belongs, a zero-width character, a stray control character — and the Invisibles marker styles include a Bytes style that prints the hex in the document's own encoding, so a UTF-8 space reads as 20 and a non-breaking space as C2 A0. When a strict reader elsewhere rejects a configuration file that looks perfect, that is normally the whole story.
  • Search the whole thing. Our find and replace works in a forced-open file exactly as it does anywhere else, so a key, a path or an error string comes out of a dump or a rotated log in one pass rather than by eye.
  • Put two versions side by side. Open access.log and access.log.1, or a config and the copy you kept before you touched it, and our comparison view pairs the two tabs and marks the differing lines in the text itself.
  • Settle the line endings. A file that came off another system converts to LF, CRLF or CR from File ▸ Line Endings, and the status-bar pill tells you what you started with.
  • Give the file the name it should have had. Save it with a matching extension and it opens as itself next time, coloured and identified without being asked.

All of it happens on your Mac. There is no account and nothing is uploaded, so a file you had to force open is exactly as private as it was sitting in the Finder. Our auto-recovery safety net looks after whatever you type into it as well, so the notes you make while reading a dump survive an unexpected quit.

Frequently asked questions

How do I open a file with no extension at all?

⇧⌘O for File ▸ Open Anything as Text…, or drag the file onto the tab bar. It usually opens as Plain Text, which is the right answer for most files opened this way. If you know better, set it from the Identify pill.

Can I open a hidden dotfile?

Yes. Reveal hidden files in the open panel with the system's own toggle and choose it, or drag it onto the tab bar. A dotfile such as .env opens as ordinary editable text, with no substitution and no reformatting, so what you save back is what you typed.

Will opening a file this way change my Mac's default application for that type?

Your existing defaults stay exactly as they are. Note My is offered in Open With and never installs itself as the default for anything, so opening a file this way is a one-off you asked for and nothing else on your Mac behaves differently afterwards. Changing a default remains something you do in the Finder, if and when you want to.

When does the binary warning appear, and can I turn it off?

It appears when the file looks like something other than text — a compiled object, an image, an archive, a database. It is a caution rather than a refusal, so you can always go ahead. The warning is a setting in Settings ▸ Encoding and is on by default.

The file opened but every accented character is wrong. Did the forced open damage it?

The file on disk is untouched — opening writes nothing to it. What you are looking at is the same bytes read with the wrong encoding. Use File ▸ Encoding ▸ Reload with Encoding… and pick another; Windows-1252 is the usual answer for older Western text, and you can reload as many times as it takes, because reloading never changes the file on disk.

Can I open files this way from an automation?

Yes. The local notemy:// URL scheme is the scriptable surface, with open, openfolder and compare verbs. Anything on your Mac that can open a URL can hand it one, and the files land in tabs ready to read. It reads files into the editor and executes nothing, so a URL you did not write yourself can do nothing more than put a file on screen.