I exported the KeePass database as xml and used Excel’s Power Query feature to import it into a sheet. I created a second sheet to convert the entries to a table that could be exported in a csv that bitwarden could understand. It required some cross references.
Unfortunately I cannot share my excel files and don’t have time to create a step by step guide. In hindsight, I wish I had written a script that does not require excel instead.
Here is what the Power Query Editor used as a configuration. The configuration depends on how you organized your KeePass folders and entries. Just to give you an idea:
let
Source = Xml.Tables(File.Contents("C:\PATH\TO\KeePass-export.xml")),
Table1 = Source{1}[Table],
Table0 = Table1{0}[Table],
#"Changed Type" = Table.TransformColumnTypes(Table0,{{"UUID", type text}, {"Name", type text}, {"Notes", type text}, {"IconID", Int64.Type}, {"IsExpanded", type logical}, {"DefaultAutoTypeSequence", type text}, {"EnableAutoType", type text}, {"EnableSearching", type text}, {"LastTopVisibleEntry", type text}}),
Group1 = #"Changed Type"{0}[Group],
#"Changed Type1" = Table.TransformColumnTypes(Group1,{{"UUID", type text}, {"Name", type text}, {"Notes", type text}, {"IconID", Int64.Type}, {"IsExpanded", type logical}, {"DefaultAutoTypeSequence", type text}, {"EnableAutoType", type logical}, {"EnableSearching", type logical}, {"LastTopVisibleEntry", type text}}),
#"Expanded Entry" = Table.ExpandTableColumn(#"Changed Type1", "Entry", {"UUID", "IconID", "ForegroundColor", "BackgroundColor", "OverrideURL", "Tags", "Times", "String", "AutoType", "History"}, {"Entry.UUID", "Entry.IconID", "Entry.ForegroundColor", "Entry.BackgroundColor", "Entry.OverrideURL", "Entry.Tags", "Entry.Times", "Entry.String", "Entry.AutoType", "Entry.History"}),
#"Expanded Entry.String" = Table.ExpandTableColumn(#"Expanded Entry", "Entry.String", {"Key", "Value"}, {"Entry.String.Key", "Entry.String.Value"}),
#"Expanded Entry.String.Value" = Table.ExpandTableColumn(#"Expanded Entry.String", "Entry.String.Value", {"Element:Text", "Attribute:ProtectInMemory"}, {"Entry.String.Value.Element:Text", "Entry.String.Value.Attribute:ProtectInMemory"})
in
#"Expanded Entry.String.Value"