How to Edit NFO Files Safely (Without Breaking Your Library)
What NFO files are, where they live, and how to change them without malformed XML quietly wiping your metadata.
An NFO file is a small XML sidecar that stores metadata (title, year, plot, ratings, cast and artwork references) next to your media. Jellyfin, Emby and Kodi read them without extra setup, which makes NFO the most portable way to control how your library looks. It also makes them easy to break: one malformed tag and a server ignores the whole file without telling you.
Where NFO files live
NFO files sit beside the media they describe, one per item:
Movies/Arrival (2016)/movie.nfo
Shows/Severance (2022)/tvshow.nfo
Shows/Severance (2022)/Season 01/Severance (2022) - S01E01 - Good News About Hell.nfoA movie uses movie.nfo (or a file named after the video), a series uses tvshow.nfo, and each episode gets its own .nfo with the same name as its video file.
What is inside
Plain XML. A trimmed movie example:
<movie>
<title>Arrival</title>
<year>2016</year>
<plot>A linguist is asked to talk with visitors who have landed on Earth.</plot>
<uniqueid type="tmdb" default="true">329865</uniqueid>
</movie>You can change any of these values in a text editor. The catch is that the file has to stay valid XML.
Three ways hand edits go wrong
- Malformed XML. A missing closing tag or an unescaped
&makes the whole file unreadable, and most servers fail quietly: no error, only missing metadata. - Getting overwritten. If your server refreshes from an online provider, the next scan can replace your edits. Lock the fields you curate, or turn off the provider for that library.
- Character encoding. Save as UTF-8. Accents and symbols saved in another encoding come back garbled.
Rules for safe edits
- Copy the file first, so a bad edit is one copy away from undone.
- Change one thing, then rescan, so you know what caused a problem.
- Escape special characters:
&becomes&and<becomes<. - Validate the XML before saving if your editor can.
- Keep episode NFO names matched to their video files.
Editing at scale
Most NFO damage comes from hand edits spread across a large library. A media manager that writes NFO for you removes that risk: it writes valid XML every time, shows the change before it writes, and keeps your own edits when it rescrapes.
For player-specific setup, see the Kodi NFO, Jellyfin and Emby pages.