.PB

PB File

PureBasic Source Code File
Ask a question
QUICK ANSWER

A .pb file is most often a PureBasic source code file - plain text you can open in any text editor or the PureBasic IDE. It can also be a Google Protocol Buffers binary (used in TensorFlow model files and protobuf pipelines), which is binary data that requires a .proto schema to decode. Plain-text .pb files are safe to open; unsolicited binary .pb files should be verified before use.

Developer: Fantaisie Software Category: Developer Files MIME: text/plain
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

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 PB file format?

A .pb file is a PureBasic source code file - plain text written in the PureBasic programming language, developed by Fantaisie Software (Frédéric Laboureur) since 1998. PureBasic is a compiled, procedural BASIC-dialect language that produces native binaries for Windows, Linux, macOS, and historically AmigaOS.

.pb files contain the full source of a PureBasic program or module: Procedure/EndProcedure blocks, Macro definitions, module declarations (DeclareModule/Module), compiler directives (CompilerIf/CompilerEndIf), and XIncludeFile statements that pull in additional source files. Comments begin with a semicolon (;). Keywords are case-insensitive. The PureBasic IDE saves files as UTF-8 with BOM on Windows by default.

Compiled output is a separate native binary - .exe on Windows, .so or .dylib on Linux/macOS - so .pb files contain only human-readable source code. The bundled PureBasic IDE provides syntax highlighting, an integrated debugger, and a GUI form designer. Visual Studio Code can also edit .pb files with community-supplied syntax extensions.

Note on naming collisions: .pb is also widely used for Protocol Buffers compiled binary data (Google's serialization format), and was historically used by PowerBASIC for source files (most BASIC dialects use .bas as their default extension). When encountering a .pb file, the surrounding project structure and content determine which format it represents. Current PureBasic is at version 6.x (2024).

Security & safety

RISK: MEDIUM

A .pb file claimed to be PureBasic source is plain text and harmless to open in a text editor. If you received an unsolicited .pb file as a binary blob (Protocol Buffers), it is data, not executable. However, malicious actors occasionally rename executable files to unexpected extensions - verify the file type with a hex editor if the source is untrusted.

Format details

in a nutshell
FULL NAMEPureBasic Source Code Fileaka PureBasic program file, PureBasic script
DEVELOPERFantaisie Softwaresince 1998 (PureBasic 1.0)
MIME TYPEtext/plain
TYPEplain text source code
This extension is also used by…
  • Protocol Buffers binary data (Google protobuf) - Google's Protocol Buffers serialization format stores serialized binary messages as .pb files; these are binary (not text) and require a .proto schema to decode.
  • PowerBASIC source file - PowerBASIC (Windows BASIC compiler by PowerBASIC Inc.) also used .pb for source code; company effectively ceased operations ~2020 and the product is considered abandonware.
  • EPICS Archiver Appliance raw data - EPICS Archiver Appliance uses .pb as its custom binary storage format for raw physics instrument time-series data (unrelated to Protocol Buffers despite same extension).

Programs that open PB files

Windows3 apps
Notepad Open-source Open the .pb file; install the PureBasic syntax plugin for highlighting.
PureBasic IDE Paid File → Open, select the .pb file. Built-in syntax highlighting, debugger, and compiler.
Visual Studio Code Open-source Open the .pb file; install 'PureBasic' extension from the Marketplace for syntax support.
macOS1 app
PureBasic IDE Paid macOS version available; open .pb files to compile and run.
Linux2 apps
PureBasic IDE Paid Linux version of PureBasic IDE supports GTK; open .pb files natively.
Visual Studio Code Open-source Open as plain text or with PureBasic extension.

Technical details

deep spec
LanguagePureBasic (procedural BASIC dialect, native compiler)
DeveloperFantaisie Software (Frédéric Laboureur), since 1998
File encodingUTF-8 with BOM (Windows default in PureBasic IDE); also Windows-1252
Comment syntaxSemicolon prefix (;)
Keyword caseCase-insensitive
Key constructsProcedure/EndProcedure, Macro, DeclareModule/Module, CompilerIf/CompilerEndIf, XIncludeFile
Compiled outputSeparate native binary (.exe on Windows, .so/.dylib on Linux/macOS); .pb file is source only
Target platformsWindows, Linux, macOS (and historically AmigaOS)
Typical file size1 KB - 500 KB (source file; compiled binaries are separate)
Multi-file projectsXIncludeFile directive includes additional .pb source files at compile time
IDE supportPureBasic IDE (bundled, with debugger and form designer); Visual Studio Code (community extension)
Extension collision.pb also used for Protocol Buffers binary data and PowerBASIC source files
Released1998 (PureBasic 1.0)
Latest versionPureBasic 6.x (2024)
Specificationwww.purebasic.com

PB conversions

Community Q&A

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

Frequently asked questions

What program opens a .pb file?
If it's PureBasic source code (plain text), use the PureBasic IDE or any text editor. If it's a Protocol Buffers binary (from TensorFlow or a protobuf pipeline), you need the protoc tool and the matching .proto schema.
How do I tell if a .pb file is PureBasic or Protocol Buffers?
Open it in a text editor. If it's readable source code with Procedure/EndProcedure keywords, it's PureBasic. If it looks like binary garbage, it's a protobuf binary file.
Is PureBasic still being developed?
Yes - Fantaisie Software released PureBasic 6.x in 2023-2024. It is a niche but actively maintained language.
What happened to PowerBASIC?
PowerBASIC Inc. ceased operations around 2020; no new versions have been released and the website is defunct. Existing .pb source files can still be compiled with old PowerBASIC versions, but the product is abandonware.

References

1Protobuf - Archive Team wikifileformats.archiveteam.org
2PureBasic official sitewww.purebasic.com

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.NOMEDIAAndroid No-Media Marker File
7.RPMSGRestricted Permission Message
8.BINCD/DVD Disc Image (BIN/CUE)
9.XDWDocuWorks 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