.CBP

CBP File

Code::Blocks Project File
Ask a question
QUICK ANSWER

A CBP file is a Code::Blocks project file - plain XML that lists the source files, build targets, compiler flags, and linker settings for a C or C++ project. Open it by double-clicking in Code::Blocks (free, cross-platform), or inspect it in any text editor since it is readable XML. The file itself runs no code and is safe to open.

Developer: Code::Blocks Team (open-source) Category: Developer Files MIME: text/xml
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Aug 12, 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 CBP file format?

A .cbp file is an XML project definition used by the Code::Blocks open-source IDE. It stores all information needed to build a project: source and header file lists, compiler selection, build target configurations (Debug, Release), preprocessor definitions, include paths, and linker flags.

The file begins with a standard <?xml declaration and uses <CodeBlocks_project_file> as its root element. Each source file is listed as a <Unit> element, optionally carrying per-file compiler overrides. Multiple build targets are defined within a <Build> section. The format version is tracked via major and minor attributes inside a <FileVersion> element; Code::Blocks upgrades older project files automatically on save.

A companion .layout file is stored alongside .cbp to record per-developer UI state - open editor tabs, cursor positions, and breakpoints. The .layout file should be excluded from version control; only .cbp should be committed.

Multiple projects can be grouped using a separate .workspace file. Code::Blocks can also import project files from Visual Studio (.vcxproj) and Dev-C++ (.dev), converting them to .cbp format.

Supported languages include C, C++, Fortran, and D (via plugins). Code::Blocks runs on Windows, Linux, and macOS, and the .cbp format is consistent across all platforms.

Security & safety

RISK: LOW

Plain XML project file. Opening it in Code::Blocks does not execute any code; build targets may reference scripts that run at compile time, but the file itself is benign.

Format details

in a nutshell
FULL NAMECode::Blocks Project Fileaka Code::Blocks Project, CBP project
DEVELOPERCode::Blocks Team (open-source)since 2005 (Code::Blocks 1.0)
MIME TYPEtext/xml
TYPEXML project definition file
This extension is also used by…
  • CD Box Labeler Pro project file - Older labelling software used .cbp for its label-design project files; unrelated to Code::Blocks and very rarely encountered.
MAGIC BYTES · FILE SIGNATURE
OFFSET
0001020304
HEX
3C3F786D6C
ASCII
<?xml
Standard XML declaration; followed by <CodeBlocks_project_file> root element.

Programs that open CBP files

Windows3 apps
Code::Blocks Open-source File → Open or double-click the .cbp file. Code::Blocks opens the project with all files listed in the Project panel.
Notepad Open-source Open to read/edit the XML directly; useful for inspecting or modifying settings without launching the IDE.
Visual Studio Code Open-source Open the .cbp file as XML to inspect its settings; use C/C++ extension for code editing. Cannot build directly from .cbp without manual CMake/Makefile creation.
macOS1 app
Code::Blocks Open-source File → Open the .cbp file. macOS builds are available from the official site (less frequently updated than Windows).
Linux1 app
Code::Blocks Open-source Install via package manager (apt install codeblocks) or official binary, then File → Open the .cbp file.

Technical details

deep spec
XML root element<CodeBlocks_project_file>
Magic bytes3C 3F 78 6D 6C ("<?xml") at offset 0
EncodingUTF-8
Format version tracking<FileVersion major="N" minor="N"> element; auto-upgraded on open in newer Code::Blocks
Build targetsDebug / Release and custom targets defined under the <Build> element
Source file entries<Unit filename="..."> elements with optional per-file <Option> compiler overrides
Companion file.layout stores per-developer UI state (open tabs, cursor positions); should be git-ignored
Workspace grouping.workspace file aggregates multiple .cbp projects
Import capabilityReads Visual Studio .vcxproj, Dev-C++ .dev, and other IDE project formats
Supported languagesC, C++, Fortran, D (via compiler plugins)
PlatformWindows, Linux, macOS (IDE and format are cross-platform)
Typical size2 KB - 50 KB
CompressionNone - plain XML, human-readable
Released2005 (Code::Blocks 1.0)
Latest versionCode::Blocks 20.03 project file format (2020)
Specificationwiki.codeblocks.org

CBP conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with CBP 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 CBP files.

Frequently asked questions

How do I open a .cbp file?
Install Code::Blocks (free from codeblocks.org) and open the file. It is also readable in any text editor since it is plain XML.
Can I open a .cbp file in Visual Studio?
Not directly. You need to either manually recreate the project in VS or convert the project to CMake first, then open with VS.
What is the .layout file next to my .cbp?
Code::Blocks saves per-user UI state (open files, cursor positions) in a .layout file with the same base name. It is not needed to build the project and should generally be excluded from version control.
Why is my .cbp file corrupted or empty after a crash?
Code::Blocks sometimes corrupts the .cbp on an abnormal exit. Check for a .cbp.save backup in the same directory, which the IDE creates before saving.
Is Code::Blocks still maintained?
Yes - the 20.03 release came after a long gap, and nightly builds continue. The project is active but release cadence is slow.

References

1Code::Blocks Wiki - File formats descriptionwiki.codeblocks.org
2Code::Blocks Wiki - Project filewiki.codeblocks.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.DATProgram Data File (generic)
5.EXEWindows Executable (Portable Executable)
6.BINCD/DVD Disc Image (BIN/CUE)
7.RPMSGRestricted Permission Message
8.NOMEDIAAndroid No-Media Marker File
9.MDMarkdown Document
10.TMPTemporary File

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

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

Open the toolbox

Browse file extensions A-Z