.ini

How to Open INI File: View, Edit Safely and Fix Settings

An INI file is a plain-text settings file, so you open it with a text editor: double-click it on Windows to open it in Notepad, or use TextEdit on Mac or any code editor. Before you change anything, make a backup and keep the same encoding. The free viewer below lets you open INI files in your browser to read sections and settings, spot errors and duplicate keys, and convert them to JSON, without uploading anything.

Category: Configuration (text) Format: [sections] and key=value Opens with: Notepad, TextEdit, VS Code

Choose what you need

Open INI File Online: View Sections, Find Errors & Convert (Free)

Drop an .ini file below or paste its text. The viewer detects the encoding (including Windows "Unicode" UTF-16), shows the file with colors and line numbers, lists every [section] and how many settings it holds, flags duplicate keys, settings outside sections and malformed lines, recognizes well-known files like desktop.ini and php.ini, and converts the settings to JSON.

Good to know: the viewer only reads the file; it never changes the original. Edit the real file in a text editor after checking it here.

🔒 Nothing is uploaded — your file never leaves this device
Or paste the text instead

What is an INI file?

An INI file is a plain-text configuration file that stores a program's settings as key=value lines grouped under [section] headings. The name comes from "initialization": the program reads it when it starts. The format dates back to early Windows and is still used by Windows itself (desktop.ini), by PHP (php.ini), MySQL (my.ini), many games and portable apps.

; comment lines start with a semicolon (or # in some programs)
[Display]
Width=1920
Height=1080
Fullscreen=true

[Audio]
Volume=80

There's no single official INI standard: details such as comment characters, quotes, case sensitivity and duplicate keys depend on the program that reads the file. That's why the viewer reports possible problems rather than hard errors.

How to open an INI file: quick answer

DeviceOpen withTip
Windows 11 / 10Notepad (double-click), Notepad++, VS CodeFiles in Program Files need an editor run as administrator to save
MacTextEdit, BBEdit, VS CodeIn TextEdit use Format > Make Plain Text
LinuxText Editor, nano, vimsudo for system files
iPhone / AndroidThe viewer above or a text-editor appRead-only check on the go

Edit an INI file safely

  1. Close the program that uses the file; many programs rewrite their INI when they exit and would undo your changes.
  2. Make a backup: copy the file and name it settings.ini.bak.
  3. Edit with a plain-text editor, never Word or WordPad, which can add formatting.
  4. Keep the encoding the viewer reports. Some files (like desktop.ini) are UTF-16 "Unicode"; saving them as ANSI or UTF-8 can break special characters.
  5. Save and restart the program, or the service (web server, database) that reads the file.
Illustration: an INI file open in Notepad. Change only the value after the equals sign.

What is desktop.ini (and can I delete it)?

desktop.ini is a hidden Windows system file that customizes how a folder looks: a custom icon, an infotip shown on hover, or a localized folder name (that's why "Documents" can appear in your language). Microsoft's documentation says it should be marked hidden and system and saved in Unicode.

  • It's not a virus. You only see it if "Hide protected operating system files" is turned off in File Explorer's folder options.
  • Deleting it is harmless but resets that folder's custom icon or name. Windows may recreate it.
  • Seeing two desktop.ini files on your desktop is normal: one belongs to your desktop folder, one to the shared Public desktop.

php.ini and other well-known INI files

FileWhat it configuresAfter editing
php.iniPHP limits and extensions (memory_limit, upload_max_filesize…)Restart the web server / PHP-FPM; php --ini shows which file is loaded
my.ini (my.cnf)MySQL / MariaDB serverRestart the database service
desktop.iniFolder appearance in WindowsRefresh the folder
win.ini, system.iniLegacy Windows settingsLeave as is
Game *.iniGraphics, controls, modsRestart the game; some games overwrite edits

INI changes ignored and other problems

The program ignores my changes

  • It rewrote the file on exit: close the program before editing.
  • You edited the wrong copy: the program may read another file (for PHP, check php --ini; many apps keep user settings in %APPDATA% instead of the program folder).
  • The setting is in the wrong section or misspelled: the viewer lists sections and flags duplicate keys.

"Access denied" when saving

Files under C:\Program Files need administrator rights. Open Notepad as administrator (right-click > Run as administrator), then File > Open the INI.

Strange characters after saving

The encoding changed. Restore your backup and save again using the encoding the viewer showed (for example "UTF-16 LE").

The program won't start anymore

Restore the backup copy. If you have none, delete or rename the INI: most programs recreate it with default settings.

Convert INI to JSON

After you open a file in the viewer, click Download as JSON: each section becomes an object with its keys and values. That's handy for scripts, comparisons or importing settings into newer apps. Values are kept as text, exactly as written in the INI.

Sources and technical references

Frequently asked questions

How do I open an INI file?

An INI file is plain text: on Windows double-click it to open it in Notepad, on a Mac open it with TextEdit, or use any code editor such as VS Code or Notepad++. The viewer on this page also shows it in your browser with sections, settings and possible errors.

How do I edit an INI file?

Close the program that uses it, make a backup copy, open the file in a plain-text editor, change only the values after the equals signs, keep the same encoding and save. Then restart the program. Files in Program Files need an editor run as administrator.

What is desktop.ini?

It's a hidden Windows system file that stores a folder's custom icon, infotip or localized name. It isn't a virus. You can delete it safely, but the folder loses its customization, and Windows may recreate it.

Why are my INI changes ignored?

Usually the program rewrote the file when it closed, you edited a different copy than the one it reads, or it needs a restart. For PHP, run php --ini to find the php.ini actually loaded. Many apps keep user settings in the AppData folder.

Can I delete INI files?

Only if you don't mind losing that program's settings: most programs recreate a default INI the next time they start. Don't delete system ones such as win.ini or system.ini, and keep a backup of anything you've customized.

What program opens INI files on Mac?

TextEdit can open INI files; choose Format > Make Plain Text before editing. Code editors such as BBEdit or VS Code are more comfortable because they keep the encoding and show line numbers.

How do I convert an INI file to JSON?

Open it in the viewer on this page and click Download as JSON. Each section becomes an object with its keys and values as text. Scripts in Python or PowerShell can do the same for many files at once.

Why does my INI file show strange characters?

It's probably saved in UTF-16 (Windows 'Unicode') and the editor guessed the wrong encoding, or a previous save changed the encoding. The viewer shows the encoding; restore a backup and save it with the same encoding.

Is an INI file safe to open?

Yes. It's plain text and opening it doesn't run anything. Be careful about what you change in system and server INI files, and keep a backup so you can undo a mistake.

What's the difference between INI and CFG files?

INI files follow the [section] and key=value style. CFG is a general extension for configuration files whose syntax varies by program; some CFG files use INI style, others use commands or JSON. See our CFG guide.

Last updated .