Mac OS X: How to Set Up TextEdit as an HTML or Plain Text Editor

TextEdit renders HTML by default. You may change its preferences to act as a plain text editor, for use in editing HTML or configuration files, for example.
This article has been archived and is no longer updated by Apple.

You expect TextEdit to open your HTML file in plain text form for editing, but it renders the file into its consumable form.

    1. Open TextEdit.
    2. Choose Preferences from the TextEdit application menu.
    3. Click the Plain Text radio button for New Document Format.
    4. Under Saving, click the checkbox to turn off "Append '.txt' extension to plain text files."
    5. Under Rich text processing, click the checkbox to turn on "Ignore rich text commands in HTML files."
    6. Be sure the checkbox for "Wrap to Page" is deselected (Figure 1).

Figure 1 Correct TextEdit Preferences for configuration file editing


1. Any data in TextEdit prior to taking these steps may contain rich text commands that become visible after the preference changes are made.

2. TextEdit may continue to render files saved from Web browsers as HTML Source, ignoring the preferences you have set. As a workaround (after following the steps above) view the source code in the Web browser and copy/paste the text into a new TextEdit document.

Published Date: Oct 7, 2016