.RPY

RPY File

Ren'Py Script
Ask a question
QUICK ANSWER

An RPY file is a Ren'Py script - the plain-text source code of a visual novel or story game made with the free Ren'Py engine. Open it in VS Code, Notepad++, or the Ren'Py SDK editor to read or edit dialogue and story logic. To run it as a game you need the Ren'Py engine; a normal Python interpreter cannot execute it.

Developer: Tom Rothamel / the Ren'Py project Category: Developer Files Open standard MIME: text/plain
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

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

.rpy is a script file used by the Ren'Py visual-novel engine. While the format's extension echoes its .py roots, an .rpy file is not a plain Python source: it is written in Ren'Py's own domain-specific language, which layers high-level storytelling statements - character dialogue, scene directives, branching menus, and conditional story flow - on top of Python's familiar syntax rules. .rpy files can contain code written in Python directly alongside Ren'Py-specific statements.

.rpy is a plain text file encoded in UTF-8 and can be opened and edited in any text editor. Authors editing .rpy scripts must take care with indentation, as Ren'Py uses indentation to define code blocks, just as Python does. For advanced logic, scripts can embed raw Python inside python: blocks or via the $ single-line prefix, giving authors access to Python's full standard library within a Ren'Py project.

When Ren'Py launches a game it compiles each .rpy source file into a binary .rpyc cache file for faster loading. Distributed games typically ship only the compiled .rpyc files, often packed inside an .rpa archive, so players do not normally see the .rpy source. Community tools such as unrpyc can decompile .rpyc files back to readable .rpy scripts.

A typical project splits its story and logic across many .rpy files - one might define characters and variables, another manage menu screens, another hold the main narrative. The Ren'Py SDK treats all .rpy files in a project directory as a single program, compiling and linking them together at startup.

Security & safety

RISK: MEDIUM

A .rpy is plain text and safe to open in an editor, but it is executable logic for the Ren'Py engine and can contain full Python inside python: blocks - so running an untrusted Ren'Py game/mod can execute arbitrary code on your machine. Read scripts from unknown mods before adding them to a game, and obtain games/mods from reputable sources. Editing the dialogue text itself is harmless; pasting in unknown python: blocks is not.

Format details

in a nutshell
FULL NAMERen'Py Scriptaka Ren'Py source script, RenPy script file
DEVELOPERTom Rothamel / the Ren'Py projectsince Ren'Py engine, first release 2004
MIME TYPEtext/plain
TYPEPlain-text source script (Python-like DSL for visual novels)
STANDARDOpen · royalty-free
This extension is also used by…
  • Twisted Resource (Python web script) - Legacy .rpy used by the Twisted/twistd web server as a Python script that returns a resource object - unrelated to Ren'Py.
  • RPGMaker / misc generic Python script - Some tools historically labelled any saved Python source as .rpy; today the Ren'Py meaning dominates.

Programs that open RPY files

Windows3 apps
Notepad Open-source Open the .rpy to read/edit the text (no engine - won't run the game).
Ren'Py SDK (engine + editor) Open-source Add the project folder, then 'Launch Project' to run it, or click a script to open it in the bundled editor.
Visual Studio Code (+ Ren'Py extension) Free Open the .rpy; install the 'Ren'Py Language' extension for highlighting, completion and lint.
macOS2 apps
Ren'Py SDK Open-source Launch the SDK, add the project, and edit/run the script.
Visual Studio Code (+ Ren'Py extension) Free Open and edit the .rpy with the Ren'Py Language extension.
Linux3 apps
Ren'Py SDK Open-source Run the SDK, add the project, edit/run the script.
gVim / Vim Open-source Open the .rpy as text to read/edit (no engine - won't run the game).
Visual Studio Code (+ Ren'Py extension) Free Open and edit the .rpy with highlighting and lint.

Technical details

deep spec
File categoryPlain-text source script - Ren'Py's domain-specific language for visual novels
EncodingUTF-8 plain text; no binary magic bytes or byte-order mark required
MIME typetext/plain (also recognized as text/x-python by generic tooling)
Compiled formEach .rpy is compiled to a binary .rpyc file by the Ren'Py engine at startup
Indentation rulePython-style significant whitespace indentation defines all code blocks
Core statement typeslabel, jump, call, menu, scene, show, hide, play, define, init
Embedded PythonFull Python code accessible via python: blocks and the $ single-line statement prefix
Python versionRen'Py 6 and 7 use Python 2 syntax; Ren'Py 8 and later require Python 3 syntax
Typical file size1 KB to ~500 KB; a full game project spans multiple .rpy files
Distribution methodGames ship compiled .rpyc files packed in .rpa archives - not the .rpy source
Platform supportAuthored on Windows, macOS, Linux; games build and run on Android and iOS as well
Project compilationAll .rpy files in the game directory are compiled and linked as a single program at launch
Syntax error reportingRen'Py SDK surfaces syntax and logic errors at launch with file name and line number
DecompilationThe community tool unrpyc can reconstruct .rpy source from compiled .rpyc bytecode
Character supportFull Unicode via UTF-8 for multilingual dialogue text and identifier names
ReleasedRen'Py engine, first release 2004
Latest versionRen'Py 8.x (Python 3 based); script syntax tracks the engine release
Open standardYes · royalty-free
Specificationwww.renpy.org

RPY conversions

Community Q&A

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

Frequently asked questions

What is an RPY file?
It's a Ren'Py script - the plain-text source of a visual novel made with the Ren'Py engine, containing dialogue, characters and story branching. (Historically the extension was also used by the Twisted Python web server, which is unrelated.)
How do I open a .rpy file?
Open it as text in VS Code (with the Ren'Py extension), Notepad++ or the Ren'Py SDK's editor to read/edit it. To run the game it belongs to, use the Ren'Py engine.
How do I run a Ren'Py game from .rpy files?
Put the scripts in a project folder, open the free Ren'Py SDK, add the project, and click Launch Project - Ren'Py compiles the .rpy to .rpyc and runs it.
What's the difference between .rpy and .rpyc?
.rpy is the human-readable source script; .rpyc is the compiled binary Ren'Py generates from it for faster loading. Shipped games usually contain only .rpyc.
Can I get the .rpy source back from a .rpyc?
Often yes - community decompilers like unrpyc reconstruct readable .rpy source from .rpyc files (used for translation/modding; respect the game's licence).
Can I open a .rpy with a normal Python interpreter?
No. Ren'Py's language isn't plain Python; a .rpy only runs inside the Ren'Py engine. A Python interpreter can read it as text but can't execute it.

References

1Ren'Py - Language Basics (script syntax)www.renpy.org
2Ren'Py - Quickstartwww.renpy.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.MDMarkdown Document
3.CRDOWNLOADChrome Partial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.RPMSGRestricted Permission Message
7.NOMEDIAAndroid No-Media Marker File
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.ICSiCalendar data 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