How to open an XML file in Chrome
Chrome can display XML files on its own, from a website or from your computer. This guide shows the quickest ways to open one, what Chrome shows you, and what to do when you get plain text, an error or a blank page.
Open an XML file from a website
Type or paste the address of the file in Chrome’s address bar, then press Enter. When the server sends the file as XML, Chrome displays it by itself, with no extension needed.
In our test, Chromium showed one line at the top of the page: “This XML file does not appear to have any style information associated with it. The document tree is shown below.” Below it came the content of the file, element by element, indented to follow its structure.
That message is not an error. It only means that the file does not link to a stylesheet, so Chrome uses its own view. Chrome’s announcement on XSLT says that XML itself is not being removed from the browser, only XSLT. Plain XML files keep this view.
Files that link to an XSL stylesheet are different, and they are the ones affected by the end of XSLT in Chrome. See what breaks when XSLT leaves Chrome.
Open an XML file from your computer
You do not need a web server to read an XML file stored on your computer.
- With the keyboard. In a Chrome window, press Ctrl+O on Windows or Linux, or ⌘+O on a Mac, then select the file. Chrome’s list of keyboard shortcuts gives this as the way to open a file from your computer.
- With the address bar. Type the full path of the file, starting with
file:///, for examplefile:///C:/Users/you/Documents/catalog.xmlon Windows.
In our test, a local XML file opened this way showed the same message and the same tree as a file from a website.
There is one exception. When a local XML file links to an XSL stylesheet, Chrome does not apply it. In our test, such a file gave an empty page, while the same stylesheet, served by a web server, was applied. Herong Yang’s notes on local XSL files describe the same blank result in Chrome.
Open XML files on Windows, a Mac or a phone
- Windows. Right-click the file, choose Open with, then Google Chrome. To open every
.xmlfile the same way, Microsoft’s help says to go to Settings > Apps > Default apps and type.xmlin the search box. - Mac. Control-click the file, choose Open With, then Google Chrome. Apple’s help adds that Get Info, then Open with and Change All, does it for every file of that type.
- Phone. Open our online XML formatter in the phone’s browser, tap Open file… and pick the file, or paste its content. The file is read on the device, never uploaded.
- Excel. Use File > Open, select the file and choose “As an XML table”. Microsoft’s help notes that Excel works out a schema when the file has none.
- To edit it. Use a text or code editor, such as Notepad, TextEdit or Visual Studio Code. Chrome only displays XML.
Notepad, Excel and phones are covered step by step in how to open an XML file on any device.
When you see plain text instead of a tree
Chrome decides how to show a file from the content type that the server sends with it, not from the file name. In our test, the same XML file appeared as a tree when it was sent as application/xml or text/xml, but as raw text, all on one line, when it was sent as text/plain.
The same happened to an RSS feed sent with the feed types application/rss+xml or application/atom+xml: Chrome showed its raw text, with no tree. If this is your problem with a feed, see what to do when an RSS feed shows as plain text.
What you can do:
- If it is your own site, have the server send XML files as
application/xmlortext/xml, the two types that gave a tree in our test. - If it is someone else’s site, save the file to your computer with an
.xmlextension, then open it from your computer as shown above.
When Chrome shows an error
If the file is not well-formed XML, Chrome does not show the tree. In our test, a file with a missing closing tag showed this message at the top of the page: “This page contains the following errors: error on line 1 at column 50: Opening and ending tag mismatch: item line 1 and catalog”. It was followed by “Below is a rendering of the page up to the first error.”
The line and column tell you where Chrome stopped reading. The real mistake can be a little earlier. In our example, an item element was never closed, and Chrome only noticed it when it reached the closing tag of catalog, at column 50.
To fix the file, open it in a text or code editor, go to the line given in the message, correct the tag, save, and reload the page in Chrome. When the whole file sits on one line, format the XML in your editor first, so that the line number points to a single element.
Our free XML validator gives the line and column of the first error, and the XML formatter indents the file. Both run in your browser.
A clearer view with an extension
Chrome’s own view is fine for a quick look. For long files, XMLNest, available on the Chrome Web Store, shows any XML document as a tree you can fold, search by name, value or XPath, and export as XML, JSON or CSV. It also has a source view with line numbers and reader views for feeds and sitemaps.
XML files from your computer open in XMLNest once you allow local files in it and turn on the extension’s “Allow access to file URLs” setting on the chrome://extensions page, which Chrome’s developer documentation describes as a setting the user controls for each extension. Like Chrome, XMLNest does not apply a stylesheet to local files.
For XML pages online that use an XSL stylesheet, see what breaks when XSLT leaves Chrome.
Questions
Why does Chrome say the XML file has no style information?
The file does not link to a stylesheet, so Chrome shows its own tree view of the XML instead. Nothing is wrong with the file.
Can I edit an XML file in Chrome?
No. Chrome displays XML files but does not offer an editor for them. Open the file in a text or code editor to change it, then reload the page in Chrome.
Do my XML files still open now that Chrome 158 has removed XSLT?
Yes. Chrome's announcement says that XML itself is not being removed, only XSLT. The removal affects XML files that use an XSL stylesheet; plain XML files still open as a tree.
What program opens an XML file?
No extra program is needed. A web browser such as Chrome shows the file as a tree. Notepad, TextEdit or a code editor shows it as text you can edit, and Excel can open it as a table.
Why does my XML file open as code or as a blank page?
Seeing the tags is normal: XML is data, not a web page, so Chrome shows it as a tree of elements. Raw text on one line means the server sent the file as plain text. A blank page usually means a local file links to a local XSL stylesheet, which Chrome does not apply.
Sources
- Chrome keyboard shortcuts - Computer - Google Chrome Help (checked on 14 October 2026)
- Chrome for Developers: browser.extension API, the “Allow access to File URLs” setting (checked on 14 October 2026)
- Chrome for Developers: Removing XSLT for a more secure browser (checked on 14 October 2026)
- Herong Yang: Web Browser Errors on Local XSL File (checked on 14 October 2026)
- Change default apps in Windows - Microsoft Support (checked on 30 October 2026)
- Choose an app to open a file on Mac - Apple Support (checked on 30 October 2026)
- Import XML data - Microsoft Support (checked on 30 October 2026)
- Tested by XMLNest : Tested by XMLNest in Chromium 156.0.8078.4 on 14 October 2026: an XML file sent as application/xml or text/xml, or opened from the computer, showed “This XML file does not appear to have any style information associated with it. The document tree is shown below.” and then the tree; sent as text/plain, application/rss+xml or application/atom+xml, it showed as raw text on one line; a broken file showed “This page contains the following errors: error on line 1 at column 50: Opening and ending tag mismatch”; a local XML file linked to a local XSL stylesheet showed an empty page, while the same stylesheet served over http was applied (checked on 14 October 2026)