Open MDF files in your browser

The data file of a Microsoft SQL Server database, and the NDFs a big one grows into. Open one right here as a folder of its tables, without SQL Server or attaching it. Nothing leaves your device.

Or drop it anywhere on this page

What you'll see

Your database opens as a folder in the file list, its tables and views with their rows counted, and each table you pick opens in the grid.

Sales.mdf

SQL Server 2022 • 24 tables • 1,284,560 rows • 412 MB

  • Every table and view in a folder • Rows counted
  • Keys lead to the rows they point at
  • Search • Every table at once
  • Export • Save a table or the whole database

About MDF

SQL Server keeps each database in data files: one MDF, the primary file with the database's own catalog, NDFs when it grows into more, and an LDF beside them, its transaction log. SQL Server 7.0 brought them in 1998 and every version since writes them, SQL Server Express and LocalDB too, which many Windows apps carry for their data.

Inside, the files are pages of 8 KB: each table's rows in a B-tree or a heap, long texts and blobs on pages of their own, and the tables set to row or page compression packed in SQL Server's own way. While SQL Server runs a database it keeps its files locked, so a copy is taken with the database detached or offline.

Filepeek reads the pages itself in your browser and opens the database as a folder of its tables, each in a grid to sort, filter and search, with the NDFs dropped beside it. Compressed tables, sparse columns, xml, sql_variant and long values are read, keys lead to the rows they point at, and Export saves a table or the whole database as a SQLite file, a SQL dump or one Excel workbook. Views, procedures and the log aren't read.

SQL Server database

Format

MIME type
application/octet-stream
Made by
Microsoft, for SQL Server
Released
1998

Inside the file

Pages
8 KB each
Files
An MDF, NDFs and an LDF log
Tables
B-trees or heaps
Compression
Row or page

Opens in every browser

Filepeek opens MDF and NDF files in Chrome, Edge, Firefox and Safari. On their own, browsers only download them, and only a SQL Server attaches them.

  • YouChromeOpens through Filepeek
  • YouEdgeOpens through Filepeek
  • YouFirefoxOpens through Filepeek
  • YouSafariOpens through Filepeek

Apps that open MDF

  • WindowsSQL Server or SQL Server Express, attached in Management Studio
  • MacSQL Server in Docker, with VS Code's mssql extension
  • iPhone and iPadNo app opens it
  • AndroidNo app opens it

Questions

How do I open an MDF file without SQL Server?

Drop it on this page or choose Peek an MDF. Its tables show as a folder in the file list, each with its rows counted, and the one you pick opens as a grid, on any computer or phone.

Do I need the LDF and the NDF files?

The LDF is the database's log, which Filepeek doesn't need. An NDF holds more of a big database's tables, so drop the MDF and its NDFs together, and only the files of that one database are read.

Why can't I copy the MDF while SQL Server runs?

SQL Server keeps a running database's files locked. In SQL Server Management Studio, take the database offline or detach it, copy the MDF and its NDFs, then bring it back online. A backup of it, a .bak, opens here too.

Can I get my data out as Excel or CSV?

Yes. Export saves the table on show as CSV, Excel, JSON or Parquet, and every table at once as a ZIP of CSVs, one Excel workbook with a sheet for each table, a SQLite database or a SQL dump.

Why is a column missing?

A computed column, which SQL Server works out each time it's read, isn't kept in the file, so it's left out, and a dropped column is gone too. Every column SQL Server stores shows.

Is every .mdf file a SQL Server database?

No. Alcohol 120%'s disc images keep their sectors in .mdf files, and loggers write MDF 3 measurements under the name too. Filepeek tells them apart by their first bytes, so a disc image opens as its tracks and a measurement as its channels.

How do I send a large MDF?

Most email stops at 20 to 25 MB. To send the whole file, upload it to Fileport and share the link. Your MDF arrives unchanged, and your recipient can start downloading before the upload finishes. It is free up to 20 GB with no account. You can also choose Send via Fileport here, which hands the open file over in a new tab.

More data formats

All supported file types

Tell us what happened

Where the file came from helps us most

With itNever the file or its name
Thank you

Opens in a new tab

Keys

Everywhere

EXIF

Verify

License

Signature