[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"extension:v3:en:wat":3},{"resolvedFromAlias":4,"canonicalExt":5,"ext":5,"name":6,"category":7,"categoryName":8,"updatedAt":9,"popularity":10,"summary":11,"howToOs":12,"quickAnswer":18,"answerIntro":19,"whatIs":20,"description":21,"furtherReading":22,"openInstructions":41,"commonIssues":55,"securityNotes":74,"faq":78,"aliases":91,"mimeTypes":92,"relatedExtensions":93,"breadcrumbs":141,"categoryAnchor":151,"categoryFuturePath":152,"metaDescription":153,"availableHowToOs":154,"openOnDeviceLinks":155,"cannotOpenReasons":171,"cannotOpenFixes":172,"convertOptions":173,"securityAffiliateMessaging":174,"securityAffiliates":175},false,"wat","WebAssembly Text Format (WAT)","code","Code","2026-06-12T07:59:02.252Z",25,".wat is the human-readable text format for a WebAssembly module. You can open it in a code editor, or convert it to a runnable .wasm binary using WebAssembly tooling such as WABT.",[13,14,15,16,17],"windows","mac","linux","ios","android","To open .WAT files on Windows, open the .wat file in a code editor (for example, Visual Studio Code) since it is plain text.","To open a .wat file, use a text editor or IDE (it’s plain text WebAssembly code). If you need to run it in a WebAssembly environment, first convert the .wat file to a .wasm binary with a tool like wat2wasm (WABT).","WAT is WebAssembly’s textual representation of a module, commonly saved with the .wat extension. It is designed to be readable and writable by humans, while the equivalent execution format is the binary WebAssembly module stored as .wasm. Tooling can translate between .wat and .wasm.","WebAssembly has two common representations: a compact binary format used for execution (.wasm) and a human-readable text format often used for debugging, learning, or writing small modules by hand (.wat). The WebAssembly specification recommends “.wat” as the file extension for text-format modules.",[23,26,29,32,35,38],{"title":24,"url":25},"Converting WebAssembly text format to binary (MDN)","https://developer.mozilla.org/en-US/docs/WebAssembly/Guides/Text_format_to_Wasm",{"title":27,"url":28},"WebAssembly text format file conventions (.wat) — WebAssembly Specification","https://webassembly.github.io/spec/core/text/conventions.html",{"title":30,"url":31},"wat2wasm demo (WebAssembly Binary Toolkit - WABT)","https://webassembly.github.io/wabt/demo/wat2wasm/index.html",{"title":33,"url":34},"WebAssembly overview (Wikipedia)","https://en.wikipedia.org/wiki/WebAssembly",{"title":36,"url":37},"IANA Media Types registry","https://www.iana.org/assignments/media-types/",{"title":39,"url":40},"WAT File: WebAssembly Text Format (FileInfo.com)","https://fileinfo.com/extension/wat",{"windows":42,"macos":45,"linux":48,"ios":51,"android":53},[43,44],"Open the .wat file in a code editor (for example, Visual Studio Code) since it is plain text.","If you need a runnable module, convert it to .wasm using a WebAssembly tool such as WABT’s wat2wasm.",[46,47],"Open the .wat file in a text editor or IDE (for example, Visual Studio Code) to view and edit the code.","To execute it as WebAssembly, convert .wat to .wasm using a tool such as WABT’s wat2wasm.",[49,50],"Open the .wat file in a text editor/IDE (for example, VS Code or a terminal editor) to inspect the text format.","Convert it to .wasm with a tool such as WABT wat2wasm when you need the binary module.",[52],"iOS does not commonly provide WebAssembly toolchains; view the file as plain text in a text editor app, or transfer it to a desktop to convert it to .wasm.",[54],"Open the file with a text editor app to view it as plain text, or move it to a desktop machine for conversion to .wasm using WebAssembly tools.",[56,62,68],{"title":57,"description":58,"steps":59},"The file opens as unreadable or with the wrong app",".wat files are plain text, but the OS may associate the extension with an unrelated program or a non-text viewer.",[60,61],"Open it explicitly in a code editor (e.g., VS Code) using File → Open.","If needed, change the default app for .wat files to your preferred editor.",{"title":63,"description":64,"steps":65},"“It won’t run” because WAT is not the executable WebAssembly format","Browsers and runtimes typically load WebAssembly in the binary .wasm format; .wat is the text form used for authoring and inspection.",[66,67],"Convert the .wat file to .wasm using wat2wasm (WABT) or equivalent tooling.","Use the produced .wasm file in your WebAssembly workflow (for example, in a web project).",{"title":69,"description":70,"steps":71},"Conversion fails with parse/validation errors","wat-to-wasm conversion tools will reject WAT that does not match the expected text-format conventions or contains syntax errors.",[72,73],"Check the file against WebAssembly text-format conventions and correct syntax issues.","Try converting again with wat2wasm and fix the reported line/column errors.",[75,76,77],".wat is human-readable source text, but it can describe a module that, once converted to .wasm and executed, performs potentially unsafe or unexpected computations within the limits of the runtime environment.","Be cautious when running .wasm produced from untrusted .wat; treat it like running code obtained from the internet.","Some tools that parse/convert WebAssembly text are complex; only use reputable tooling when converting untrusted files.",[79,82,85,88],{"question":80,"answer":81},"Is a .wat file the same as a .wasm file?","No. .wat is the human-readable WebAssembly text format, while .wasm is the binary format typically used for execution.",{"question":83,"answer":84},"How do I convert .wat to .wasm?","Use a WebAssembly tool that supports converting text to binary, such as WABT’s wat2wasm (available as a demo and as tooling). MDN also documents the conversion workflow.",{"question":86,"answer":87},"Does .wat have an official recommended extension?","Yes. The WebAssembly specification’s conventions recommend “.wat” for text-format WebAssembly modules.",{"question":89,"answer":90},"Is there a registered MIME type specifically for .wat?","This depends on what is registered with IANA. If you need a standards-based media type, check the IANA Media Types registry for any current registration related to WebAssembly or a dedicated type for WAT.",[],[],[94,100,105,111,117,123,129,135],{"ext":95,"name":96,"category":7,"categoryName":8,"popularity":97,"summary":98,"howToOs":99},"php","PHP script (PHP source code)",85,".php files typically contain PHP source code used on web servers to generate dynamic web pages and API responses. You can open them in a code editor, but they are usually executed by a web server (often via PHP-FPM) rather than “run” like a normal desktop app.",[13,14,15,16,17],{"ext":101,"name":102,"category":7,"categoryName":8,"popularity":97,"summary":103,"howToOs":104},"sql","SQL script (Structured Query Language)",".sql files contain SQL statements (queries, schema definitions, and data changes) that can be run by a database tool or opened as plain text for review and editing.",[13,14,15,16,17],{"ext":106,"name":107,"category":7,"categoryName":8,"popularity":108,"summary":109,"howToOs":110},"cs","C# source code file",80,".cs files contain C# source code used to build .NET applications and libraries. They are plain-text files typically edited in code editors and IDEs such as Visual Studio Code with C# tooling.",[13,14,15,16,17],{"ext":112,"name":113,"category":7,"categoryName":8,"popularity":114,"summary":115,"howToOs":116},"go","Go source file",78,".go files contain source code written in the Go (Golang) programming language. You can open them in code editors (for reading/editing) or build/run them with the Go toolchain.",[13,14,15,16,17],{"ext":118,"name":119,"category":7,"categoryName":8,"popularity":120,"summary":121,"howToOs":122},"tsx","TypeScript JSX (TSX) source file",75,".tsx is a TypeScript source code file that contains JSX syntax, commonly used with React-style UI components. You open it in a code editor (for viewing/editing) and build it with TypeScript tooling (for running in apps).",[13,14,15,16,17],{"ext":124,"name":125,"category":7,"categoryName":8,"popularity":126,"summary":127,"howToOs":128},"kt","Kotlin source file",72,".kt files contain Kotlin source code used to build Kotlin applications (including Android apps) and libraries. You typically open them in a code editor or IDE such as IntelliJ IDEA or Android Studio.",[13,14,15,16,17],{"ext":130,"name":131,"category":7,"categoryName":8,"popularity":132,"summary":133,"howToOs":134},"swift","Swift Source Code",70,".swift is a Swift programming language source file used to write apps and other software. You open it in code editors and IDEs such as Xcode or other text/code editors.",[13,14,15,16,17],{"ext":136,"name":137,"category":7,"categoryName":8,"popularity":138,"summary":139,"howToOs":140},"dart","Dart source code",65,".dart files contain source code written in the Dart programming language. You open them in a code editor/IDE or work with them using the Dart SDK tools.",[13,14,15,16,17],[142,145,148],{"label":143,"to":144},"Home","/",{"label":146,"to":147},"File Extension Index","/file-extension",{"label":149,"to":150},".WAT","/file-extension/wat","category-code","/category/code","Learn what .WAT files are, how to open them on every platform, common fixes, and security best practices.",[13,14,15,16,17],[156,159,162,165,168],{"os":13,"label":157,"to":158},"Open .WAT on Windows","/how-to/open-wat-on-windows",{"os":14,"label":160,"to":161},"Open .WAT on Mac","/how-to/open-wat-on-mac",{"os":15,"label":163,"to":164},"Open .WAT on Linux","/how-to/open-wat-on-linux",{"os":16,"label":166,"to":167},"Open .WAT on iOS","/how-to/open-wat-on-ios",{"os":17,"label":169,"to":170},"Open .WAT on Android","/how-to/open-wat-on-android",[57,63,69],[60,61],[],"code_runtime",[176,180],{"name":177,"description":178,"affiliateUrl":179},"Avast","Avast offers free and premium antivirus software that protects against viruses, malware, ransomware, and phishing. Scan files before opening them to ensure safety.","https://www.avast.com/lp-aff-consumer-store?expid=inf601",{"name":181,"description":182,"affiliateUrl":183},"Norton","Norton 360 delivers comprehensive antivirus protection, VPN, and identity theft monitoring. Scan files for threats before opening to keep your device secure.","http://buy.norton.com/aff_home?utm_campaign=en-ww_nor_n36_aff_nas_nau_nah_cj_nad_low:_sec_nat_mktc_norton_360"]