Melanija Knavs was born in Novo Mesto, Slovenia (then part of Yugoslavia), on April 26, 1970. Her father, Viktor Knavs, was from the nearby town of Radeče, and managed car and motorcycle dealerships for a socially-owned vehicle manufacturer. Her mother Amalija (née Ulčnik) came from the village of Raka and worked as a patternmaker at the children's clothing manufacturer Jutranjka in Sevnica. As a child, Melania and other children of workers at the factory participated in fashion shows that featured children's clothing. She has an older sister, Ines, who is an artist and her "longtime confidant", and an older half-brother—whom she reportedly has never met—from her father's previous relationship.
Knavs grew up in a modest apartment in a housing block in Sevnica, in the Lower Sava Valley. Her father was in the League of Communists of Slovenia, which espoused a policy of state atheism. As was common, however, he had his daughters secretly baptized as Catholics. When the Trumps met Pope Francis at the Vatican in 2017, Melania brought her rosary and asked the Pope to bless it.
When Knavs was a teenager, she moved with her family to a two-story house in Sevnica. As a high-school student, she lived in a high-rise apartment in Ljubljana. She attended the Secondary School of Design and Photography in Ljubljana, and studied architecture and design at the University of Ljubljana for one year before she dropped out.