A file format defines how information is encoded and organized inside a file so software can interpret it. Text, images, audio, video, documents, archives, executables, and structured data all use format-specific rules.
A format is not the same as a filename extension. Renaming photo.jpg to photo.png changes the label, not the encoded image. Correct conversion requires software that reads the source format and writes a valid destination format.
Extension, MIME type, and file signature
Filename extension: the suffix such as
.pdf,.jpg, or.zip. Operating systems often use it to choose an application.Media or MIME type: a label such as
application/pdforimage/pngused by email and web protocols.File signature: characteristic bytes or structures within the file that inspection tools can use to identify its likely format.
Container and codec: media containers such as MP4 can hold streams encoded with different codecs, so the extension alone does not guarantee playback support.
MDN explains that browsers rely on the HTTP Content-Type rather than the extension to decide how to process a web response. Incorrect types can cause compatibility and security problems.
Common format groups
Documents: TXT for plain text, DOCX or ODT for editing, and PDF for a fixed-layout distribution copy.
Images: JPEG for photographs, PNG for lossless raster images and transparency, SVG for scalable vector graphics, and WebP or AVIF for modern web delivery.
Data: CSV for simple tables, JSON or XML for structured exchange, and database or columnar formats for specialized workloads.
Archives: ZIP, 7z, and similar containers combine files and may apply compression or encryption.
Programs and scripts: EXE, MSI, APK, JS, PowerShell, shell scripts, and macro-enabled documents can execute instructions.
How to choose a format
Define the purpose. Editing, publishing, printing, analysis, streaming, and archiving have different needs.
Confirm recipient support. Test the exact applications, operating systems, fonts, codecs, and accessibility tools involved.
Balance quality and size. Lossy compression can greatly reduce size but permanently removes information.
Preserve features. Conversion may discard layers, formulas, comments, color profiles, subtitles, metadata, macros, or digital signatures.
Plan for longevity. Prefer documented, widely implemented formats and keep original source files plus validation information.
Safety checks for unknown files
show complete extensions and be suspicious of double extensions such as
invoice.pdf.exe;verify the sender and expected filename through a separate channel;
scan the file and keep the operating system and viewer updated;
do not enable macros, active content, or editing merely because a document requests it;
extract untrusted archives only in a controlled location and inspect their contents before opening;
use a sandbox or isolated analysis environment when organizational policy requires it.
An extension/signature mismatch is a reason to investigate, not automatic proof of malware. Some legitimate formats begin with a common container signature; for example, modern office files are ZIP-based packages.
Conversion and archiving
Keep an untouched original before conversion. Use a trusted local or approved enterprise converter for confidential files; an unknown online converter receives a copy of the content. Open the result, compare important content, validate accessibility, and verify that sensitive metadata, comments, or tracked changes were handled as intended.
For archives, record the format specification, software version, checksums, creation date, and any required fonts or codecs. Periodically test representative files rather than assuming that an extension guarantees future readability.
Reference: MDN: Media types.
File format FAQ
Can I convert a file by renaming it?
No. Renaming changes the filename only. Use software that supports both formats.
Does PDF remove all hidden information?
No. A PDF may retain properties, attachments, comments, layers, form data, or redacted content. Inspect and sanitize the actual output.