The pack.mcmeta file is the identifying file used by texture packs on Minecraft Java Edition.
On this page you'll find an example of the file you can copy & paste into your own pack, and a full description of how the file works.
Important: if you're visiting this page due to issues with your pack.mcmeta file, I recommend visiting the Pack Fixer
which automatically fixes common issues with texture packs (including mcmeta files).
Anyways, we'll start off with the file itself: (pack.mcmeta)
Important to note is that since 1.21.9 there is an adjusted layout of the pack.mcmeta file, see the second example.
{ "pack": { "pack_format": 1, "description": "desc" } }
{ "pack": { "min_format": 88, "max_format": 88, "description": "desc" } }
Just an fyi: this is the most simple version of this file (and is also all that's needed for 99% of users).
Before starting off it is important to note that this file must be in the mcmeta file format, the easiest way to make one of these is right
click inside of your texture pack, select "new", and choose "text document". Once you've added the desired content (above) you can rename
the file from new_file.txt to pack.mcmeta.
If you need a txt to mcmeta converter, visit This Page
Now, an explanation of the elements in the default pack.mcmeta file:
pack_format, the format version of your texture pack, which tells Minecraft the intended game version(s) for your pack. To find the corresponding values for each Minecraft version visit This Wiki Article. Alternatively use the Texture Pack Version Converter to convert your texture pack to ANY Minecraft version! 1.6.1 - 1.21.8 only
min_format, this represents the smallest value for pack_format your pack supports. For the rest min_format will work the exact same as the pack_format tag. 1.21.9+ only
max_format, in combination with the min_format tag defines the largest pack_format value your pack supports. In packs made for 1.21.9 and above both the min_format and max_format keys must be defined in the pack.mcmeta file. These both being the same value means your pack supports a single game version. 1.21.9+ only
description, add a description for your pack in between the quotation marks, this will show up inside of Minecraft.
If you need help making your own Minecraft Texture Pack, a full tutorial can be found here :))