How to Edit Files on Mac | Choose the Right Tool First

Editing files on a Mac requires picking the right app for the file type – TextEdit for plain text, Pages or Word for documents, a terminal editor like nano for script files, and Preview or Acrobat for PDFs.

Macs come with several built-in editors that handle different formats, but picking the wrong one can add hidden formatting or fail to save changes at all. A plain text file that opens in Word may pick up invisible styles. A PDF opened in Pages won’t let you edit paragraphs. The trick is knowing which tool matches your file’s format and your goal – and that’s what this guide walks through, one file type at a time.

Plain Text Files: TextEdit Handles Most Needs

TextEdit is the built-in graphical editor for plain text files (.txt, .csv, .conf, and similar formats). It shows the content in a familiar window with menus and a cursor you can click to type anywhere.

To open and edit a text file in TextEdit:

  1. Open TextEdit from Launchpad or the Applications folder.
  2. Press Command-O, select the file, and click Open.
  3. Click anywhere in the document and type to edit.
  4. Press Command-S to save the changes.

One important setting: TextEdit defaults to Rich Text mode, which applies formatting like bold and italics. For true plain text files (code, configs, or files that will be processed by scripts), switch TextEdit to plain text first. Go to Format > Make Plain Text before saving, or set TextEdit’s default format to plain text in its Preferences. Word processors like Pages or Word add hidden formatting codes that break plain-text files, so stick with TextEdit or a terminal editor for those.

Command-Line Editing with Terminal and Nano

When you need to edit a config file, script, or any text file without leaving the keyboard, macOS includes command-line editors accessible through the Terminal app. nano is the beginner-friendly one – it shows on-screen controls at the bottom and requires no memorized commands.

To edit a file using nano in Terminal:

  1. Open Terminal from Launchpad or the Utilities folder.
  2. Type nano followed by a space and the file’s path. For example: nano ~/Documents/settings.conf or nano alone to start a new file.
  3. The file opens inside the terminal window. Use arrow keys to move the cursor, then type or delete text normally.
  4. Press Ctrl-O (the letter O, not zero) to save the file, then Enter to confirm the filename.
  5. Press Ctrl-X to exit nano.

Terminal editors keep the file in pure plain text with zero formatting – no hidden styles, no rich text codes. That’s essential for system configs, programming files, and any text destined for automated tools. Apple’s own guidance uses nano as the example editor for command-line text editing on macOS.

Word Documents: Pages or Microsoft Word

For .docx files, .doc files, and word-processing documents with formatting, headers, or images, use the app that created it or one that handles the format properly. Microsoft Word for Mac is the most compatible choice, but Apple’s Pages can open and edit Word documents too.

In Microsoft Word for Mac:

  1. Open Microsoft Word from the Applications folder or via Spotlight.
  2. Choose File > Open and select the document.
  3. Edit text, images, and formatting using the toolbar and document body.
  4. Choose File > Save to save changes to the same file, or File > Save As to create a copy.

In Pages (Apple’s free word processor):

  1. Open Pages and choose File > Open.
  2. Select the Word file and click Open. Pages will convert it and show a notice.
  3. Edit the text and formatting as needed.
  4. If you need the file back in Word format, go to File > Export To > Word and save the copy.

Pages is a strong choice when you don’t have a Microsoft 365 subscription; it opens most Word documents cleanly and preserves the main formatting. Complex layouts or tracked changes may shift slightly during conversion, so check the exported file if fidelity matters.

PDFs: Preview for Marks, Acrobat for Full Edits

PDFs are a trickier format on a Mac because they aren’t designed for easy text editing. Apple’s Preview app can add text annotations, highlight content, and crop images from the page, but it cannot change the underlying text itself. For deleting or replacing sentences, the job requires a proper PDF editor like Adobe Acrobat.

To annotate a PDF in Preview:

  1. Open the PDF in Preview (double-click the file by default).
  2. Click the markup icon (the pencil-tip-in-a-circle) or go to Tools > Annotate.
  3. Choose the text tool, click where you want new text, and type your annotation.
  4. To crop part of the image, select the area and go to Tools > Crop.

For full PDF text editing, use Adobe Acrobat:

  1. Open Adobe Acrobat and choose File > Open to load the PDF.
  2. Click the Edit PDF tool in the right pane, then click the text you want to change.
  3. Type the replacement text or delete existing content.
  4. Press Command-S to save the edited PDF.

Scanned PDFs are a special case: they’re images of the page, not editable text. Before editing one, you need optical character recognition (OCR) software to extract the text. Adobe Acrobat includes OCR; Preview does not. Apple’s support communities confirm that Preview “cannot fully edit the underlying PDF text” and that scanned PDFs require OCR first.

How Each File Type Maps to the Right Editor

The table below lays out which tool works for each file type, so you can pick the right one before you open the file.

File Type Best Built-in Editor Why This One
.txt, .csv, .conf TextEdit (plain text mode) Keeps formatting out; saves clean UTF-8 text
.docx, .doc Pages Free, handles formatting, exports back to Word
Scripts, configs nano in Terminal Pure plain text, no accidental rich-text conversion
.rtf TextEdit Native rich-text editor; preserves bold, italics, fonts
PDF (annotations) Preview Quick text notes, highlights, cropping – free
PDF (full edit) Adobe Acrobat Edits existing text, OCR for scans, page rearrangement
Images (.jpg, .png) Preview Resize, crop, adjust color, add text boxes

Use TextEdit in Plain Text Mode to Avoid Hidden Codes

The most common Mac editing mistake is using a word processor for a plain text file. Applications like Word, Pages, and even TextEdit’s rich text mode embed formatting codes – font sizes, line spacing, style tags – that can break a config file, corrupt a CSV, or make a script fail silently. Apple’s official Terminal guidance uses nano for a reason: command-line editors write nothing but the characters you type.

If you prefer a graphical window over a terminal, TextEdit in plain text mode (Format > Make Plain Text) is the safe middle ground. Turn on View > Show Ruler if you want to see line numbers, and double-check the file save format stays as plain text. The after saving, reopen the file in a terminal – if you see only the words you typed, it worked.

One App Can’t Edit Everything – Match the Tool

Macs give you multiple free editors, but none handles every file format perfectly. Preview is excellent for marking up a PDF but cannot change its sentences. Pages opens Word documents but cannot open PDFs for multi-page editing – Apple Communities notes that Pages only shows the first page of a PDF as a single object. TextEdit makes quick text edits but adds invisible formatting if left in rich text mode.

The single most useful habit: before opening a file, ask what format it is and what you want to do. Annotate? Use Preview. Rewrite paragraphs? Use Acrobat. Fix a config line? Use nano. Change a paragraph in a .docx? Use Pages or Word. Save a plain text file without garbage? Use TextEdit in plain text mode. Pick the tool first, and the edit takes seconds.

References & Sources