.LDIF

LDIF File

LDAP Data Interchange Format File
Ask a question
QUICK ANSWER

An LDIF file is a plain-text file that stores LDAP directory entries - people, groups, contacts - as readable "attribute: value" records. Open it in any text editor to read it; import it into Apache Directory Studio, OpenLDAP, or Mozilla Thunderbird to use the data. The main concern with LDIF files is data sensitivity, not malware.

Developer: IETF (defined in RFC 2849); originally Tim Howes / University of Michigan Category: Data Files Open standard MIME: text/plain
OPENS ON Windows macOS Linux
Related: .PKPASS · .DAT · .JSON · .RIS

On this page

19k+ extensions indexed
Last reviewed Jul 22, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the LDIF file format?

An .ldif file contains LDAP object data saved in plain text for LDAP data interchange. The LDIF specification is defined in RFC 2849, published in June 2000. LDAP (Lightweight Directory Access Protocol) is a standard for directory information services based on the X.500 standard but requires far fewer resources and bandwidth; it runs over TCP/IP.

An .ldif file can store either information about a directory or changes made to it, never both in the same file. The file may open with an optional version: 1 line, followed by one or more records. Each record begins with a dn: (distinguished name) line - the unique identifier of the directory object - followed by attribute: value pairs. A blank line separates consecutive records. Non-ASCII or binary attribute values are Base64-encoded and marked with a double colon (attribute:: value); long lines may be folded by inserting a newline and a single leading space.

LDIF file structure is comprised of sets of records and separators. Operations that can be stored in change-record .ldif files include:

  • add - add a record,
  • delete - delete a record,
  • modify - modify a record,
  • modrdn / moddn - change a distinguished name (the record's unique identifier).

Records of applied changes comprise a changetype: line that identifies the operation and additional lines describing each change. Records that store directory content are represented as multiple lines which identify the object and its attributes in the form of attribute: value pairs.

.ldif files are used with command-line tools such as ldapadd and ldapmodify (part of OpenLDAP), as well as graphical tools like Apache Directory Studio, when importing or exporting directories. Mozilla Thunderbird can export and import address books as .ldif, making them interoperable with vCard files and CSV spreadsheets. Because directory dumps may contain password hashes and personal data, .ldif files should be treated as confidential.

Security & safety

RISK: LOW

An LDIF file is plain text and does not execute, so opening one is safe. The real concern is data sensitivity, not malware: LDIF directory dumps can contain personal data, organisational structure, group memberships and sometimes password hashes (e.g. userPassword attributes) - treat them as confidential, store them securely and avoid emailing raw directory exports. When importing an unfamiliar LDIF into a live directory, review the 'changetype:' lines first, since a change record can delete or overwrite existing entries.

Format details

in a nutshell
FULL NAMELDAP Data Interchange Format Fileaka LDIF file, LDAP Data Interchange Format
DEVELOPERIETF (defined in RFC 2849); originally Tim Howes / University of Michigansince Early 1990s with the University of Michigan LDAP project; standardized as RFC 2849 (June 2000)
CATEGORYData Files
MIME TYPEtext/plain
TYPEPlain-text directory data interchange format (text)
STANDARDOpen · royalty-free

Programs that open LDIF files

Windows4 apps
Mozilla Thunderbird Open-source Address Book → Tools → Import → choose 'LDIF' to import contacts; export contacts as LDIF the same way.
Apache Directory Studio Open-source Open the LDIF in the LDIF editor to view/edit, or right-click a connection → Import → LDIF to load entries into a directory.
Notepad / any text editor Open-source Open the .ldif directly to read or hand-edit the records (it's plain text).
LDAP Admin Open-source Connect to a directory, then use Import to apply the LDIF (the db's 'LDAP Browser').
macOS3 apps
Mozilla Thunderbird Open-source Import/export contacts as LDIF via the Address Book.
Apache Directory Studio Open-source Cross-platform LDAP client; open or import the LDIF into a connected directory.
TextEdit / any text editor Built-in Open the .ldif as plain text (Format → Make Plain Text) to read the records.
Linux3 apps
Mozilla Thunderbird Open-source Import/export address-book contacts as LDIF.
OpenLDAP command-line tools (ldapadd / ldapmodify) Open-source Load an LDIF into a directory: 'ldapadd -x -D <binddn> -W -f data.ldif' (or ldapmodify for change records).
Apache Directory Studio Open-source GUI LDAP client; open the LDIF editor or import the file into a connection.

Technical details

deep spec
MIME typetext/plain; also recognized as application/ldif and text/x-ldif
File encodingPlain UTF-8 text; non-ASCII and binary attribute values are Base64-encoded inline
Record identifierEvery record opens with a dn: line (distinguished name) - the unique object identifier in the directory tree
Record separatorA single blank line between consecutive records
Value encoding markerSingle colon (attribute: value) for plain text; double colon (attribute:: value) for Base64-encoded values
Line foldingLong lines may be split by inserting a newline followed by exactly one leading space on the continuation line
Record flavoursContent records store a directory snapshot; change records carry changetype: add, modify, delete, or modrdn operations
File identificationNo binary magic bytes; identified by version: 1 or dn: appearing at the start of a line
Format version fieldOptional version: 1 declaration on the first line, as defined in RFC 2849
Typical file sizeKilobytes for small address books; hundreds of megabytes for large enterprise LDAP directory exports
Security sensitivityMay contain userPassword hashes and personal attributes; must be protected like any confidential directory data
Platform supportCross-platform - Windows, macOS, Linux; usable on any OS with an LDAP client or plain-text editor
ReleasedEarly 1990s with the University of Michigan LDAP project; standardized as RFC 2849 (June 2000)
Latest versionRFC 2849 (2000); change-record extensions in related RFCs
Open standardYes · royalty-free
Specificationwww.rfc-editor.org

LDIF conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with LDIF files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about LDIF files.

Frequently asked questions

How do I open an LDIF file?
It's plain text - open it in any editor (Notepad++, VS Code, TextEdit) to read it. To actually use the data, import it with an LDAP tool like Apache Directory Studio or the OpenLDAP ldapadd command, or into Thunderbird's Address Book for contacts.
What is an LDIF file used for?
It's the standard text format for exporting, importing, backing up and bulk-editing LDAP directory data - and for moving address-book contacts between mail clients and directory services.
How do I convert LDIF to CSV?
Import the LDIF into Apache Directory Studio or Thunderbird and export to CSV, or run a small script (PowerShell/python-ldap). The records map naturally to rows and the attributes to columns.
How do I convert LDIF to vCard (VCF)?
Import the LDIF into Mozilla Thunderbird's Address Book, then export the contacts as vCard (.vcf). Apple/Google Contacts can then import the .vcf.
How do I import an LDIF into Active Directory or OpenLDAP?
For OpenLDAP use 'ldapadd'/'ldapmodify -f file.ldif'; for Active Directory use 'ldifde -i -f file.ldif'. Always check the changetype records and bind credentials first.
Is LDIF the same as LDAP?
No - LDAP is the directory protocol; LDIF is just a text file format for representing and exchanging the data that lives in an LDAP directory.

References

1RFC 2849 - The LDAP Data Interchange Format (LDIF)www.rfc-editor.org
2Apache Directory Studio (LDIF editor & import)directory.apache.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.EXEWindows Executable (Portable Executable)
6.RPMSGRestricted Permission Message
7.MDMarkdown Document
8.DATProgram Data File (generic)
9.NOMEDIAAndroid No-Media Marker File
10.TXTPlain Text File

Related extensions

.PKPASSApple Wallet Pass (formerly Passbook)
.DATProgram Data File (generic)
.JSONJavaScript Object Notation file
.RISResearch Information Systems citation file
.OFXOpen Financial Exchange
.CSVComma-Separated Values

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z