Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
SortContainers
Adds a sort button to chests and other containers that alphabetically sorts (and stacks) their contents. Client-side.
| Last updated | 7 hours ago |
| Total downloads | 122 |
| Total rating | 0 |
| Categories | Mods Tweaks Client-side AI Generated |
| Dependency string | dsoltyka-SortContainers-1.0.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2350ValheimModding-Jotunn
Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.
Preferred version: 2.30.2README
Sort Containers
A small client-side Valheim mod that adds a sort button to chests and every other container window.
Click it and the container's contents are laid out alphabetically, row by row. Partial stacks of the same item are combined on the way (optional).

- The button sits just right of the vanilla Place stacks button and matches its styling.
- Sorting is by item name, then quality (highest first), then stack size.
- Works on any container: chests, carts, ships, reinforced chests, modded containers that use the vanilla window.
- Nothing is dropped, lost or moved between inventories. It only rearranges what is already in the container.
Installation
Install with r2modman / Thunderstore Mod Manager, or drop SortContainers.dll into BepInEx/plugins.
Requires BepInExPack Valheim and Jötunn. Client-side only: the server does not need it. The client that has a container open already owns its data, so the sorted layout is saved and synced exactly like the vanilla "Place stacks" button.
Configuration
BepInEx/config/dsoltyka.SortContainers.cfg is created on first launch.
| Section | Setting | Default | Meaning |
|---|---|---|---|
| General | MergeStacks |
true | Combine partial stacks of the same item while sorting |
| Layout | ButtonGap |
4 | Gap between "Place stacks" and the sort button, in pixels |
| Layout | ButtonSize |
0 | Button size in pixels; 0 matches the "Place stacks" height |
| Layout | IconPadding |
6 | Inset of the icon inside the button |
Layout settings take effect the next time the container window is created (relog or restart).
Source
Code is on GitHub at dsoltyka/ValheimSortContainers.
License
MIT. See LICENSE.