lookup> .pyc

.PYC·File Extension

Python BytecodeCompiled Python bytecode cache file.

Data & Text
Extension.pyc
File typePython Bytecode
MIME type
CategoryData & Text
Charset
Compressible
Format familypython

What is a .pyc file?

A .pyc file is a Python Bytecode — Compiled Python bytecode cache file.

In the mime-db registry it has no registered standard MIME type. When serving this file over HTTP, use a Content-Type that matches its actual format.

  • Use VS Code or Notepad++ to open and edit .pyc files.
  • Any text editor (Notepad, VS Code) can inspect the raw content as text.

When served over HTTP, responses should set the following header:

# No standard MIME type is registered for .pyc

Common software that reads/writes .pyc:

Python
.pycextension of
format
pythonserved as
mime type
sent via header
http header
  • Configuration files
  • Data interchange between systems
  • API request and response payloads
  • Logs and data exports
  • Open the file with Python, make your changes and save.
  • Most editors preserve the original formatting and encoding — avoid changing the charset.
  • Create a new file and save it with the .pyc extension, or export this format from Python.

What programs can open .pyc files?

Common options include Python. You can also open many of these files with built-in viewers or a browser.

How do I create a .pyc file?

Create a new file in any text editor or the app that owns the format and save it with the .pyc extension.

Updated 2026-08-18

Related extensions

Related headers

Related methods

Related status codes