.h C header

Text & source code

MIME typetext/x-chdr
DescriptionC header
CategoryText & source code
Based ontext/x-csrc

Frequently asked questions

What is a .h file?

A .h file is a “C header” (MIME type text/x-chdr).

How do I open a .h file?

With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.

How can you tell a genuine .h file?

No fixed signature at the start of the file is registered for this format; it is recognised mainly by its extension. On Linux and macOS, file --mime-type example.h shows the guessed type.

Which format is .h based on?

Technically a .h file is a subtype of “C source code” (text/x-csrc), so programs for that base format can often read it too.

Which MIME type belongs to .h?

The MIME type is text/x-chdr. In the Apache web server: AddType text/x-chdr .h; in nginx: types { text/x-chdr h; }.

Nearby entries